Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I have a matrix in which I am comparing the forecast versions. However, the variance repeats after each version. What is the workaround to show the delta in one column? Appreciate your help very much.
This is what I have:
Account | Forecast Jan | Variance | Forecast Feb | Variance |
A | 4 | 2 | 6 | 2 |
B | 5 | -4 | 1 | -4 |
This is what I want:
Account | Forecast Jan | Forecast Feb | Variance |
A | 4 | 6 | 2 |
B | 5 | 1 | -4 |
Solved! Go to Solution.
Hi @Fara-15
You can refer to the following solution.
Sample data
Sample measure
Sum = SUM('Table'[Value])
1.Create a table
2.Then create a measure
MEASURE =
VAR _a =
CALCULATE ( [Sum], 'Table'[Month] IN VALUES ( 'Table (2)'[Type] ) )
RETURN
IF (
SELECTEDVALUE ( 'Table (2)'[Type] ) <> "Var",
_a,
VAR _b =
MAXX (
FILTER (
ALLSELECTED ( 'Table (2)' ),
[Index]
= ( MAX ( 'Table (2)'[Index] ) - 1 )
),
[Type]
)
VAR _c =
CALCULATE ( [Sum], 'Table'[Month] = _b )
VAR _d =
MAXX (
FILTER ( ALLSELECTED ( 'Table (2)' ), [Index] = MAX ( 'Table (2)'[Index] ) - 2 ),
[Type]
)
VAR _e =
CALCULATE ( [Sum], 'Table'[Month] = _d )
RETURN
_c - _e
)
3.Put the following field to matrix
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Fara-15
You can refer to the following solution.
Sample data
Sample measure
Sum = SUM('Table'[Value])
1.Create a table
2.Then create a measure
MEASURE =
VAR _a =
CALCULATE ( [Sum], 'Table'[Month] IN VALUES ( 'Table (2)'[Type] ) )
RETURN
IF (
SELECTEDVALUE ( 'Table (2)'[Type] ) <> "Var",
_a,
VAR _b =
MAXX (
FILTER (
ALLSELECTED ( 'Table (2)' ),
[Index]
= ( MAX ( 'Table (2)'[Index] ) - 1 )
),
[Type]
)
VAR _c =
CALCULATE ( [Sum], 'Table'[Month] = _b )
VAR _d =
MAXX (
FILTER ( ALLSELECTED ( 'Table (2)' ), [Index] = MAX ( 'Table (2)'[Index] ) - 2 ),
[Type]
)
VAR _e =
CALCULATE ( [Sum], 'Table'[Month] = _d )
RETURN
_c - _e
)
3.Put the following field to matrix
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Fara-15 ,
this is normal because the values in which you're adding it appearing under the column in which month name, so how the matrix work is that for every value in the column it will show the measure values.
Proud to be a Super User! | |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.