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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AKHIL_RB_123
Frequent Visitor

Unable to find sum of different categories in same dimension

Greetings all,

 

I'm new to Power BI/Dax in general so apologize if this might seems obvious but I couldn't manage to find a way to do it.

 

I basically have a dimension category here I need to sum AA & BB then CC & DD. And create a final table B

 

TABLE A: DETAILS
 CategoryValue 
AA10 
BB20 
CC30 
DD40 

 

 

TABLE B: EXPECTED OUTCOME
 CategoryValueOutput
AA1030
BB2030
CC3070
DD4070

 

 

1 REPLY 1
amitchandak
Super User
Super User

@AKHIL_RB_123 , First Create a new column

 

Cat =

Switch(True() ,

[Category] in {"AA", "BB"} , "Cat1" ,

"Cat2")

 

 

Now a new measure

sumx(filter(Table, [Cat]=earlier([Cat]), Table[Value])

 

or

 

sumx(allselected(Table), [Cat] = Max([Cat]) ), [Value])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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