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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
magutierrez1
Frequent Visitor

Matrix Visual

I need to add a third column to matrix visual showing the difference between the filtered period columns.  The value for each row in the period column is calcuated from the same field.   

 

magutierrez1_0-1690007021510.png

 

1 ACCEPTED SOLUTION
rubayatyasmin
Community Champion
Community Champion

hi, @magutierrez1 

 

try this one

Period Difference = 
VAR CurrentPeriod = MAX('YourTableName'[PeriodField])
VAR PreviousPeriod = CALCULATE(MAX('YourTableName'[PeriodField]), FILTER(ALL('YourTableName'), 'YourTableName'[DateField] < MAX('YourTableName'[DateField])))
RETURN CurrentPeriod - PreviousPeriod

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

1 REPLY 1
rubayatyasmin
Community Champion
Community Champion

hi, @magutierrez1 

 

try this one

Period Difference = 
VAR CurrentPeriod = MAX('YourTableName'[PeriodField])
VAR PreviousPeriod = CALCULATE(MAX('YourTableName'[PeriodField]), FILTER(ALL('YourTableName'), 'YourTableName'[DateField] < MAX('YourTableName'[DateField])))
RETURN CurrentPeriod - PreviousPeriod

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.