Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Date + Time Input Variable for Measure

Hi Together,

i got following problem:

 

I made a Measure, which creates me a new column with 0 or 1 to mark all Timestamps which are inbetween of the two variables of my measure.

 

 

InDateTimeRange =

var _rangeStart= DATE(2022,01,01) + TIME(08,00,0)

var _rangeEnd = DATE(2022,01,15) + TIME(08,00,00)

return

IF(

SELECTEDVALUE(Data[TimestampFrom]) >= _rangeStart

&& SELECTEDVALUE(Data[TimestampTo]) <= _rangeEnd

&& SELECTEDVALUE(Data[TimestampTo]) <>BLANK()

, 1, 0)

 

 

This measure is working fine for me, BUT the hardcoded red part (DATE + TIME) needs to be changed to something the user can select on the report. Input parameters are not working for me, because they can only store decimal numbers or numbers. The time part is also very important for me, just the date would not be enough..

 

Thanks a lot!

 

Lennart

6 Replies