Forum Discussion
Direct Query question - latest date
- Anonymous4 years ago
Hi andra2 ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a measure as below to judge if it is the latest created on date group by team, strategy and stock
Flag = VAR _latestdate = CALCULATE ( MAX ( 'Table'[Created On] ), ALLEXCEPT ( 'Table', 'Table'[Team], 'Table'[Strategy], 'Table'[Stock] ) ) RETURN IF ( SELECTEDVALUE ( 'Table'[Created On] ) = _latestdate, 1, 0 )2. Apply a visual-level filter with condition "Flag is 1" to the table/matrix visual
Best Regards
if you have a date table you can use today funtion or you can use max function
and how today or max function will help? can you, please, write the measure I should be using?
- Anonymous4 years agoNot applicable
Hi andra2 ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a measure as below to judge if it is the latest created on date group by team, strategy and stock
Flag = VAR _latestdate = CALCULATE ( MAX ( 'Table'[Created On] ), ALLEXCEPT ( 'Table', 'Table'[Team], 'Table'[Strategy], 'Table'[Stock] ) ) RETURN IF ( SELECTEDVALUE ( 'Table'[Created On] ) = _latestdate, 1, 0 )2. Apply a visual-level filter with condition "Flag is 1" to the table/matrix visual
Best Regards