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 / Combine Two DAX Querie...
Power Automate
Unanswered

Combine Two DAX Queries into One CSV Table

(0) ShareShare
ReportReport
Posted on by 115

Dear Microsoft Power Automate Community,

 

Refer to my existing post in Combine Two DAX Queries into One CSV Table, and La... - Page 3 - Power Platform Community (microsoft.com), I'm still having issue to combine two DAX queries into one single CSV table.

 

I believe my condition was set correctly, because if I change the condition based on @v-yueyun-msft advice, the csv file has reversed the display of 2 DAX queries (see the screenshot below) and the figure "135150" for total of [Sum of Quantity] is still missing.

jwhk_0-1708562607901.png

I have rollbacked my condition as followed which displayed the correct 2 DAX queries in the correct position in csv file except the missing figure "135150":

 

jwhk_1-1708562607917.png

 

Condition:

Dataset 2a Rows > Dataset 2b Rows

 

If Yes, Select 2a:

range(0,length(outputs('Run_a_query_against_a_dataset_2a')?['body/firstTableRows']))
concat(split(body('Create_CSV_table_2b'), decodeUriComponent('%0D%0A'))?[item()], ',,,', split(body('Create_CSV_table_2a'), decodeUriComponent('%0D%0A'))?[item()])
 
If No, Select 2b:
range(0,length(outputs('Run_a_query_against_a_dataset_2b')?['body/firstTableRows']))
concat(split(body('Create_CSV_table_2a'), decodeUriComponent('%0D%0A'))?[item()], ',,,', split(body('Create_CSV_table_2b'), decodeUriComponent('%0D%0A'))?[item()])

 

For another DAX query for Dataset 1a Rows and Dataset 1b Rows, I put the similar conditions as below.

 

Condition:

Dataset 1a Rows > Dataset 1b Rows

 

If Yes, Select 1a:

range(0,length(outputs('Run_a_query_against_a_dataset_1a')?['body/firstTableRows']))
concat(split(body('Create_CSV_table_1b'), decodeUriComponent('%0D%0A'))?[item()], ',,,', split(body('Create_CSV_table_1a'), decodeUriComponent('%0D%0A'))?[item()])
 
If No, Select 1b:
range(0,length(outputs('Run_a_query_against_a_dataset_1b')?['body/firstTableRows']))
concat(split(body('Create_CSV_table_1a'), decodeUriComponent('%0D%0A'))?[item()], ',,,', split(body('Create_CSV_table_1b'), decodeUriComponent('%0D%0A'))?[item()])


Then, this csv file has 2 issues:

1) The DAX query on the right-hand side has misalignment after row 7.

2) The figure of 119,660 for the total [Quantity] is missing for DAX query on the right-hand side.

 

jwhk_2-1708562608051.png

 

If I change the flow actions by adding additional "Select" actions after "Run as query against a dataset" actions (refer to the screenshot below), I could see the figure "135150" in "Select 2b" and "Create CSV table 2b" actions, but it went missing after the "Condition" action.

jwhk_1-1708563382526.png

Could you advise how to resolve these missing total figure and misalignment issues? 


Thank you!

Categories:
I have the same question (0)
  • jwhk Profile Picture
    115 on at

    Dear Microsoft Power Automate Community,

     

    This issue has been resolved in another post in Combine Two DAX Queries into One CSV Table, and La... - Page 4 - Power Platform Community (microsoft.com).

     

    Please assist to close this post. Thank you!

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard