Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi
I have a matrix like this in my report, that shows budget and actual costs on a project.
2020 | 2020 | 2021 | 2021 | ||
Project | Employee | budget | actual | budget | actual |
MyProject | Person A | 500 | 600 | 400 | 350 |
MyProject | Person B | 200 | 150 | ||
MyProject | Person C | 300 | 200 | 400 | 500 |
Total | 800 | 800 | 1000 | 1000 |
But I'm trying to add an extra measure that shows the total variance for the entire duration of the project.
For Person A, that would be: 500 + 400 - 600 - 350 = -50.
The problem is Person B, who doesnt have any budget or costs in 2020, so the total variance is blank that year, but correct in 2021.
I want the total variance to be exactly the same each year.
Is there a way to do this?
2020 | 2020 | 2020 | 2021 | 2021 | 2021 | ||
Project | Employee | budget | actual | Total variance on project | budget | actual | Total variance on project |
MyProject | Person A | 500 | 600 | -50 | 400 | 350 | -50 |
MyProject | Person B | 200 | 150 | 50 | |||
MyProject | Person C | 300 | 200 | 0 | 400 | 500 | 0 |
Total | 800 | 800 | 0 | 1000 | 1000 | 0 |
Solved! Go to Solution.
Hi @nimp_kp ,
You can create another new measure as below and put this new measure to replace the original measure onto the matrix visual... Please find the details in the attachment.
Measure =
VAR _budget =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "budget" )
VAR _actual =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "actual" )
RETURN
IF ( ISINSCOPE ( 'Table'[Type] ), SUM ( 'Table'[Value] ), _budget - _actual )
If the above one can't help you get the desired result, please provide more raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @nimp_kp ,
You can create another new measure as below and put this new measure to replace the original measure onto the matrix visual... Please find the details in the attachment.
Measure =
VAR _budget =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "budget" )
VAR _actual =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "actual" )
RETURN
IF ( ISINSCOPE ( 'Table'[Type] ), SUM ( 'Table'[Value] ), _budget - _actual )
If the above one can't help you get the desired result, please provide more raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
@nimp_kp , Is not
measure = sum(Table[Budget]) - Sum(Table[Actual])
or
measure = calculate(sum(Table[Budget]) - Sum(Table[Actual]), removefilters(Table[Year]))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
21 | |
20 | |
19 | |
13 | |
12 |
User | Count |
---|---|
42 | |
27 | |
23 | |
22 | |
22 |