Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

PowerbI challenge: Multiple GroupBy in PowerBI. How to do it?

Hi,

I have below table where I am trying to do grouping of columns based on their months( which is same in different rows) so that I can have 12 unique rows of different months with their value summarized. I am able to do group by in one column but then its fetches me a new table and I am not able to do groupiing on other columns.

 

For example: Below table have Actual and Planned date.

  • I need to sum up YTD values based on Actual Date and
  • sum up Initial FC value based on Planned Date.

All these in one table so that the result will be Planned Date and Actual Date having rows from Jan- Dec and their corresponding YTD and FC values summed up.

  • For months which are not there they can return 0 value.

Hope I am clear and guys out there can help me in figuring this outCapture.JPG



1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Based on my understanding, you want to sum YTD based on Actual Date month and sum Initial FC based on Planned Date month, display those two new columns in one table based on months, right?

 

In your scenario, you can duplicate a new query to get a new table named Test(2) from the original table (Test), and create a new column month in each table. Then calculate total for YTD based on Actual Date month in Test(2), and total for Initial FC based on Planned Date month in Test. Finally merge those two tables. For details, you can download attached pbix file.

 

q6.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Based on my understanding, you want to sum YTD based on Actual Date month and sum Initial FC based on Planned Date month, display those two new columns in one table based on months, right?

 

In your scenario, you can duplicate a new query to get a new table named Test(2) from the original table (Test), and create a new column month in each table. Then calculate total for YTD based on Actual Date month in Test(2), and total for Initial FC based on Planned Date month in Test. Finally merge those two tables. For details, you can download attached pbix file.

 

q6.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.