web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Renaming columns after...
Power Automate
Unanswered

Renaming columns after quering Power BI with measure

(0) ShareShare
ReportReport
Posted on by 10

Hello
I have the following DAX to query a dataset in Power BI. Works great, but would like to rename the columns. Problem lies in knowing how to refer to any column that is a measure. For example the TotalActualWork column? I would usually use a select action and MAP the column, but unsure on syntax for measures

 

// DAX Query

DEFINE
	VAR __DS0Core = 
		SUMMARIZECOLUMNS(
			'SIGGA Summarized'[Employee(s)],
			"SumTotalActualWork", CALCULATE(SUM('SIGGA Summarized'[TotalActualWork])),
			"SumTotalActualWork_CurrentMonth", CALCULATE(SUM('SIGGA Summarized'[TotalActualWork_CurrentMonth])),
			"SumTotalActualWork_LastMonth", CALCULATE(SUM('SIGGA Summarized'[TotalActualWork_LastMonth]))
		)

	VAR __DS0PrimaryWindowed = 
		TOPN(501, __DS0Core, 'SIGGA Summarized'[Employee(s)], 1)

EVALUATE
	__DS0PrimaryWindowed

ORDER BY
	'SIGGA Summarized'[Employee(s)]

 

123CaM321_0-1690764045445.png

 

Thanks!

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @123CaM321 ,

     

    This is Power Automate community, while it seems a Power Bi question. Please post the question in Power Bi community instead:

    Microsoft Power BI Community - Microsoft Fabric Community

     

    Best regards,

  • 123CaM321 Profile Picture
    10 on at

    Thanks. At what point does it become a question relating to Power Automate? Just so I know in the future. The above DAX is inside Power Automate. I use a 'Query a dataset' action inside Power Automate and was asking how to map the columns using a select action in Power Automate, that is then passed to a 'create HTML table' action. 

  • v-jefferni Profile Picture
    on at

    Hi @123CaM321 ,

     

    Since DAX query is the code language used in Power Bi, I considered it as a Power BI question. If you encounter issues about creating/editing flows in Power Automate, i.e., how to use actions, how to apply your logic in a flow or how to write expressions, it becomes a Power Automate question.

     

    Best regards,

  • spence501 Profile Picture
    3 on at

    Hi 123CaM321

    I have exactly this problem myself and would definitely consider this Power Automate question i.e. how do you use the select action to change the name of a calculated column output from the query a dataset from power bi action. Did you get a solution to this??

  • 123CaM321 Profile Picture
    10 on at

    Hi Spence. I remember this took me a while. Thias has to be a Power Automate question! Hope this helps. Using my example it would look like this

    123CaM321_0-1714329128179.png

    These are the expressions

     

    @item()?['SIGGA Summarized[Employee(s)]']
    @item()?['[SumTotalActualWork_LastMonth]']
    @item()?['[SumTotalActualWork_CurrentMonth]']
    @item()?['[SumTotalActualWork_LastWeek]']

     

    Good luck

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard