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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Matrix table calculate difference at end of table

Hi,

 

Looking to calculate the difference % on a matrix table below at the end of the column, any help would be appreciated - 

Thanks 

LPM_0-1717664921603.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Anonymous 

You can try the following DAX to solve the problem.

vyaningymsft_1-1719221881835.png


DAX:

April = 
VAR _status = SELECTEDVALUE('Table'[Status])
VAR _counts = CALCULATE(COUNTROWS('Table'),'Table'[Status] = _status && MONTH('Table'[Date]) = 4)
VAR _allCounts = CALCULATE(COUNT('Table'[Status]),MONTH('Table'[Date]) = 4,ALL())
VAR _result = DIVIDE(_counts,_allCounts)
RETURN
_result

May = 
VAR _status = SELECTEDVALUE('Table'[Status])
VAR _counts = CALCULATE(COUNTROWS('Table'),'Table'[Status] = _status && MONTH('Table'[Date]) = 5)
VAR _allCounts = CALCULATE(COUNT('Table'[Status]),MONTH('Table'[Date]) = 5,ALL())
VAR _result = DIVIDE(_counts,_allCounts)
RETURN
_result

 

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, @Anonymous 

You can try the following DAX to solve the problem.

vyaningymsft_1-1719221881835.png


DAX:

April = 
VAR _status = SELECTEDVALUE('Table'[Status])
VAR _counts = CALCULATE(COUNTROWS('Table'),'Table'[Status] = _status && MONTH('Table'[Date]) = 4)
VAR _allCounts = CALCULATE(COUNT('Table'[Status]),MONTH('Table'[Date]) = 4,ALL())
VAR _result = DIVIDE(_counts,_allCounts)
RETURN
_result

May = 
VAR _status = SELECTEDVALUE('Table'[Status])
VAR _counts = CALCULATE(COUNTROWS('Table'),'Table'[Status] = _status && MONTH('Table'[Date]) = 5)
VAR _allCounts = CALCULATE(COUNT('Table'[Status]),MONTH('Table'[Date]) = 5,ALL())
VAR _result = DIVIDE(_counts,_allCounts)
RETURN
_result

 

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Anonymous
Not applicable

Hi, @Anonymous 

Happy to help, but how do you calculate the difference % on a matrix table below at the end of the column, what are the calculation rules, what is the final result you want to get, and can you share pbix files without sensitive data for testing.

Best Regards,
Yang
Community Support Team

 

Anonymous
Not applicable

Thanks for the help, final result should look as below on a matrix visual - 

Calculation - Difference between May and April values.n 1.33% - 0.5% = 0.83%

 

StatusAprilMayDiference
Completed - Within Time1.33%0.50%0.83%
Completed - Late97.53%98.49%-0.96%
Outstanding - Late1.14%1.01%0.13%

 

Below some test data, which would be the source for the table - 

DateStatus
01/04/2024Completed - Within Time
01/04/2024Completed - Late
01/04/2024Outstanding - Late
01/04/2024Completed - Within Time
01/04/2024Completed - Late
01/04/2024Outstanding - Late
01/04/2024Completed - Within Time
01/04/2024Completed - Late
01/04/2024Outstanding - Late
01/04/2024Completed - Within Time
01/04/2024Completed - Late
01/04/2024Outstanding - Late

 

I've tried a measurement but doesnt seem to want to calculate.

 

Thanks 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors