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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Ramachandran
Helper III
Helper III

Calculate Sum of value based on Group

Hi, How to calculate total value for group wise? I dont have any idea about it. some one suggest me.
I want to report data like,

Ramachandran_1-1649168683762.png

fyi, First Category is more than one Sub Category but Second and Third  Category only one Sub Category.

thanks,

Ram 

 

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

Hi, @Ramachandran ;

May be you could create two measures:

Salesv = 
IF(ISINSCOPE('Table'[Category]), IF(ISINSCOPE('Table'[Subcategory])||MAX([Category])="First",SUM([sales])),SUM([sales]))
Salesv = 
IF(ISINSCOPE('Table'[Category]), IF(ISINSCOPE('Table'[Subcategory])||MAX([Category])="First",SUM([sales])),SUM([sales]))

The final output is shown below:

vyalanwumsft_0-1649384608443.png


Best Regards,
Community Support Team _ Yalan Wu
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

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Ramachandran ;

May be you could create two measures:

Salesv = 
IF(ISINSCOPE('Table'[Category]), IF(ISINSCOPE('Table'[Subcategory])||MAX([Category])="First",SUM([sales])),SUM([sales]))
Salesv = 
IF(ISINSCOPE('Table'[Category]), IF(ISINSCOPE('Table'[Subcategory])||MAX([Category])="First",SUM([sales])),SUM([sales]))

The final output is shown below:

vyalanwumsft_0-1649384608443.png


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

serpiva64
Solution Sage
Solution Sage

Hi,

you only need to add a Matrix like this

serpiva64_0-1649169831560.png

with this rows and this values

serpiva64_1-1649169870232.png

and deselect Stepped layout

serpiva64_2-1649169919620.png

 

 

 

 

I don't want to see the second and third rows total. I need a First category total and Overall category total.

any other is it possible to achieve on this?

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors