cancel
Showing results for
Search instead for
Did you mean:
Highlighted
Helper I

## 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

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

Is there any way to do this via the Visualization?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support

## Re: calculate a difference in a matrix column

Hi @CVassalotti ,

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.

3 REPLIES 3
Highlighted
Super User IX

## Re: calculate a difference in a matrix column

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

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper I

## Re: calculate a difference in a matrix column

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

Highlighted
Community Support

## Re: calculate a difference in a matrix column

Hi @CVassalotti ,

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.

## Helpful resources

Announcements

#### Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

#### August Community Highlights

Check out a full recap of the month!

#### August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

#### Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors