Forum Discussion
shishanki
3 years agoRegular Visitor
Date silver and 24 hours data
I want to load power bi report with last 24 hours data. I am able to achieve that using measure but is it possible to also have date slicer for report so when report loads first time, user can view 2...
shishanki
3 years agoRegular Visitor
Also is it possible to write isfilter for date slicer?
Anonymous
3 years agoNot applicable
Hi shishanki,
Dax function not able to directly use on slicer, current you can only write a measure formula with custom expression and use on 'visual level filter' of specific visuals to apply custom filter effects.
Here is the measure formula with condition to check if any selection applies on your slicer or they will return last 24 hour records:
flag =
VAR currDate =
MAX ( 'Table'[Datetime] )
RETURN
IF (
ISFILTERED ( 'Table'[hour] ),
"Y",
IF ( AND ( currDate >= NOW () - 1, currDate <= NOW () ), "Y", "N" )
)
Last 24 hour recordsselected on slicer
Regards,
Xiaoxin Sheng