Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
Hi @Anonymous
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous For example if you have a DateTime slicer so you can use SELECTEDVALUE() function.
eg. SelectedValue(TableName[DateTime Column])
Can you give me an example ? I am not able to use Selectedvalue in my formula.
Thank you. How can I filter a Visual by a date and time range otherwise ?
Hi @Anonymous ,
How can I filter a Visual by a date and time range otherwise ?
Pls refer this:
Use dimension tables to filter your visuals.
@Anonymous , A measure or slicer value can not be used in a calculated column. You need use measure
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |