Forum Discussion
Victormar
Helper V
4 years agoReturn a value based on a condition
Hi community, So I have a table with columns refering to measurements we are registering, and also the same amount of columns refering the measure with IsLatest, no show which is the last measure...
- Anonymous4 years ago
Hi Victormar ,
From my understanding, you want to create a IsLatest column.
You could create a measure like
IsLatest = VAR _MAX = MAXX ( FILTER ( ALL ( 'Table' ), [VALUE] <> BLANK () && [ID] = MAX ( 'Table'[ID] ) ), [DATE] ) RETURN IF ( _MAX = MAX ( 'Table'[DATE] ), 1, IF ( SUM ( 'Table'[VALUE] ) <> BLANK (), 0 ) )Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi Victormar ,
From my understanding, you want to create a IsLatest column.
You could create a measure like
IsLatest =
VAR _MAX =
MAXX (
FILTER ( ALL ( 'Table' ), [VALUE] <> BLANK () && [ID] = MAX ( 'Table'[ID] ) ),
[DATE]
)
RETURN
IF (
_MAX = MAX ( 'Table'[DATE] ),
1,
IF ( SUM ( 'Table'[VALUE] ) <> BLANK (), 0 )
)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.