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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Varan_15
Helper II
Helper II

Matrix table Row Total how to change

Hi All,

I have 2 category A and B if i show in matrix table the ROW TOTAL should show like below
Row total = Category A- Category B


Capture1.PNG

please help how to achive this in matrix table.

1 ACCEPTED SOLUTION
visheshjain
Solution Supplier
Solution Supplier

Hi @Varan_15,

 

This is how I made the sample data and depending on your model the measure might need to be tweaked.

 

ProductCategoryAmount

Fruits

A

200

Fruits

B

50

Veg

A

600

Veg

B

40

 

Here are the 2 measures that I created:

Total = SUM('Table'[Amount])

 

Net Total = IF( NOT(ISINSCOPE('Table'[Category])), CALCULATE([Total], FILTER('Table', 'Table'[Category] = "A")) - CALCULATE([Total], FILTER('Table', 'Table'[Category] = "B")), [Total] )​

 

This is the result obtained:

 

visheshjain_1-1667371912830.png

 

 

Hope this answers your question and if it does please kudo it and/or mark it as the solution so that others can reach it faster.

 

Thank you,

Vishesh Jain

 

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



View solution in original post

2 REPLIES 2
Varan_15
Helper II
Helper II

Thanks @visheshjain ,

It's working fine as expected.

visheshjain
Solution Supplier
Solution Supplier

Hi @Varan_15,

 

This is how I made the sample data and depending on your model the measure might need to be tweaked.

 

ProductCategoryAmount

Fruits

A

200

Fruits

B

50

Veg

A

600

Veg

B

40

 

Here are the 2 measures that I created:

Total = SUM('Table'[Amount])

 

Net Total = IF( NOT(ISINSCOPE('Table'[Category])), CALCULATE([Total], FILTER('Table', 'Table'[Category] = "A")) - CALCULATE([Total], FILTER('Table', 'Table'[Category] = "B")), [Total] )​

 

This is the result obtained:

 

visheshjain_1-1667371912830.png

 

 

Hope this answers your question and if it does please kudo it and/or mark it as the solution so that others can reach it faster.

 

Thank you,

Vishesh Jain

 

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.