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

Announcements

News and Announcements icon
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
    Microsoft Employee 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard