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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Sum of category and sub category

Hello I'm looking to take the sum of a sub category and the main category, thank you so much for your help in advance. I'm not sure if this is possible to be in PQ so so much bight minds here so I thgouht I'll give it a shot. Thank you!

 

 

BEFORE      
      
Account # Category Sort Sub - Cat Company 1 Company 2 
                1Dream Revenue               1                                                                  1                                                                  9
                2Dream Revenue               1                                                                  2                                                                10
                8Dream Revenue               1                                                                  8                                                                16
                9Dream Revenue               1                                                                  9                                                                17
              11Cow  Revenue               2                                                                11                                                                19
              12Cow  Revenue               2                                                                12                                                                20
              15Cow  Revenue               2                                                                15                                                                23
              16Cow  Revenue               2                                                                16                                                                24

 

 

AFTER    
    
Account # Category Company 1 Company 2 
                1              1                                       9
                2              2                                     10
 A Total:               3                                     19
                8              8                                     16
                9              9                                     17
 C Total:              17                                     33
    
 Dream Revenue              12                                     36
    
    
              11            11                                     19
              12            12                                     20
 D Total:             23                                     39
              15            15                                     23
              16            16                                     24
 G Total:             31                                     47
    
 Cow Revnue              54                                     86
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Power Query is supposed to be used for data transformations and summarizing tables mainly. To achieve your results just load your tables to Power BI from Power Query and visualize on Matrix Visual as shown below. This way you can slice and dice your data. You can also customize the sub-total labels in the properties under "By Row",

I also attached a file below my signature for your to check.

Fowmy_0-1622907101944.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@Anonymous 

Power Query is supposed to be used for data transformations and summarizing tables mainly. To achieve your results just load your tables to Power BI from Power Query and visualize on Matrix Visual as shown below. This way you can slice and dice your data. You can also customize the sub-total labels in the properties under "By Row",

I also attached a file below my signature for your to check.

Fowmy_0-1622907101944.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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