Forum Discussion
Anonymous
4 years agoNot applicable
Date change compare based on data version
Hi All, I am very new to Power BI, but a long-time excel user. I have spent a good deal of time reading and watching videos trying to solve what I think should be pretty straightforward, but no luc...
- 4 years ago
Hi, Anonymous
You can try the following methods.
New table:
Table 2 = VALUES('Table'[Instance])Measure:
StartChange = VAR N1 =SELECTEDVALUE ( 'Table'[StartSchedule] ) VAR N2 =FILTER ( ALL ( 'Table' ), 'Table'[ID] = MAX ( 'Table'[ID] ) && 'Table'[Instance] IN 'Table 2' ) VAR N3 =CALCULATE ( MAX ( 'Table'[StartSchedule] ), TOPN ( 1, FILTER ( N2, [Instance] < SELECTEDVALUE ( 'Table'[Instance] ) ), [Instance], DESC ) ) VAR N4 =IF ( ISBLANK ( N3 ), N1, N3 ) RETURN VALUE ( N1 - N4 )Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years ago
Hello v-zhangti , that is great, works exactly as expected! Is a great foundation for the problems I am looking to solve.
Thanks!
MFelix
4 years agoSuper User
Hi Anonymous ,
Try the following measure:
StartChange Measure =
IF (
ISBLANK ( SUM ( 'Table'[StartChange] ) ),
"",
SUMX (
TOPN (
2,
FILTER (
ALL ( 'Table'[ID], 'Table'[Instance], 'Table'[StartChange] ),
'Table'[Instance] <= MAX ( 'Table'[Instance] )
&& 'Table'[ID] = MAX ( 'Table'[ID] )
),
'Table'[Instance], DESC
),
'Table'[StartChange]
)
)
Only using the IF statement because you have values that are blank and you want to present them in matrix.