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

calculate a difference in a matrix column

I am trying to get a matrix to show the difference  between Current State Total and Future State Total for the below

CVassalotti_0-1593614754786.png

the data is very simple, but I am trying to avoid transforming the data into many more columns and calculating there.  

CVassalotti_1-1593614798217.png

Is there any way to do this via the Visualization?

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

How about this?

Difference Measure =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[ViewpointName] = "Feture State" )
    - CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[ViewpointName] = "Current State" )

And then put it into your Matrix visual.

 

If this doesn't work, please share me a dummy .pbix file, removing sensitive information.

 

 

Best Regards,

Icey

 

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
Icey
Community Support
Community Support

Hi @Anonymous ,

 

How about this?

Difference Measure =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[ViewpointName] = "Feture State" )
    - CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[ViewpointName] = "Current State" )

And then put it into your Matrix visual.

 

If this doesn't work, please share me a dummy .pbix file, removing sensitive information.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

you have to create a measure to have different current state and future state

Anonymous
Not applicable

Please expand your answer.  The total you see is generated in the Matrix as an average of the values in the 4 previous.  So how would I write a measure to average the current values vs the average of the future values for each row, which is calculated by 8 rows in the table.  below data represent one row

CVassalotti_0-1593616174380.png

 

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.