Forum Discussion
Pikachu-Power
5 years agoImpactful Individual
Difference between two measures/rows
Hello, I have following measure: FC = SUMX ( PLANTABLE, SWITCH ( TRUE (), PLANTABLE[Quarter] = 1, if( PLANTABLE[KNT] = "SbA" && PLANTABLE[Lay] = "FCI" , PLANTABLE[Value],blank()), PLA...
- 5 years ago
Something is wrong. What is Lay = "FC"? FC is the name of the measure. For Lay we have the entries Ist, FCI, FCII, FCIII, FIIII.
I think the best way is a PIVOT before. Makes it easier.
tex628
5 years agoCommunity Champion
Essentially what you need to do is calculate the FC amount on the IST row and reverse.
You need to do this based on a unique identifier, which looks like it is KNT.
Measure =
VAR KNT = SELECTEDVALUE(Table[KNT])
VAR LAY = SELECTEDVALUE(Table[Lay])
Return
IF( Lay = "FC" ,
CALCULATE( [IST] , ALL(Table) , Table[KNT] = KNT Table[Lay] = "Ist") - [FC] ,
[IST] - CALCULATE( [FC] , ALL(Table) , Table[KNT] = KNT Table[Lay] = "FC")
)
Let me know if you need any more help .
/ J
Pikachu-Power
5 years agoImpactful Individual
Something is wrong. What is Lay = "FC"? FC is the name of the measure. For Lay we have the entries Ist, FCI, FCII, FCIII, FIIII.
I think the best way is a PIVOT before. Makes it easier.