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

Community site session details

Session Id : Gf7rfLUIbtyKN36Eg35CoW
Power Automate - Building Flows
Unanswered

Renaming columns after quering Power BI with measure

Like (0) ShareShare
ReportReport
Posted on 31 Jul 2023 00:42:31 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!

I have the same question (0)
  • v-jefferni Profile Picture
    on 31 Jul 2023 at 08:01:24
    Re: Renaming columns after quering Power BI with measure

    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 31 Jul 2023 at 18:35:41
    Re: Renaming columns after quering Power BI with measure

    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 01 Aug 2023 at 02:25:03
    Re: Renaming columns after quering Power BI with measure

    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 25 Apr 2024 at 09:10:18
    Re: Renaming columns after quering Power BI with measure

    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 28 Apr 2024 at 18:34:41
    Re: Renaming columns after quering Power BI with measure

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard