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

Help with Matrix row calculations

Hello, 

 

Im trying to make a matrix visual and perform calculations on rows. For example:

 

Starting Data:

Fee Revenue5007/1/2020Actual
Fee Revenue10007/1/2020Forecast
Event Driven Fee2007/1/2020Actual
Event Driven Fee3007/1/2020Forecast

 

Expected Output

Fee Revenue5001000
Event Driven Fee200300
Recurring Costs300700

 

Now, there is much more to the visual and other calculations that need to occur, but this is an example of one of them. How can i achieve this within a matrix visual?

 

Thanks for the help!

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You can use Row subtotal as Recurring Costs. Change the name of Row subtotal to Recurring Costs and use the following measure in your matrix:

 

Measure = IF(HASONEVALUE('Table'[Fee Categrory]),SUM('Table'[Fee]), CALCULATE(SUM('Table'[Fee]),FILTER('Table','Table'[Fee Categrory] = "Fee Revenue")) - CALCULATE(SUM('Table'[Fee]),FILTER('Table','Table'[Fee Categrory] = "Event Driven Fee")))

 

Capture1.PNG

 

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EeDUDk821gdMvtLrP5SCQSsBl1S6tcpweJHMJVx978F6hw?e=rXtgk2

 

If this post help, please consider accept it as the solution to help other member find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@vanessafvg Hi, Thanks for the quick reply! Unfortunately power BI will not allow me to make that measure part of the columns. Also, wouldnt that give me the calculation as part of the column after actual and forecast? i want to display this as a row item.

 

 

Hi @Anonymous ,

 

You can use Row subtotal as Recurring Costs. Change the name of Row subtotal to Recurring Costs and use the following measure in your matrix:

 

Measure = IF(HASONEVALUE('Table'[Fee Categrory]),SUM('Table'[Fee]), CALCULATE(SUM('Table'[Fee]),FILTER('Table','Table'[Fee Categrory] = "Fee Revenue")) - CALCULATE(SUM('Table'[Fee]),FILTER('Table','Table'[Fee Categrory] = "Event Driven Fee")))

 

Capture1.PNG

 

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EeDUDk821gdMvtLrP5SCQSsBl1S6tcpweJHMJVx978F6hw?e=rXtgk2

 

If this post help, please consider accept it as the solution to help other member find it more quickly.

 

Best Regards,

Dedmon Dai

if you want to hard code the values

 

actuals = CALCULATE ( SUM ( [ fee revenue] ) - SUM ( [event driven fee] ), fieldname = "Actual" 

and the same for forecast. 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




vanessafvg
Super User
Super User

example

placing your measure type on the column 

recurring cost =
CALCULATE ( SUM ( [ fee revenue] ) - SUM ( [event driven fee] ) 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.