Forum Discussion
Date and Time slicer from Calendar table
Hi jinma78,
That's really a problem. It seems we have to add more tables. The main idea of this workaround is capturing the date in a measure.
Best Regards,
Can you provide an example as to what you mean by creating more tables?
Regards
- v-jiascu-msft7 years ago
Microsoft Employee
Hi jinma78,
Two tables for Hour and two tables for Minute. I would suggest creating two time table instead. Please refer to the snapshot below.
startTimeTable = GENERATESERIES ( TIME ( 0, 0, 0 ), TIME ( 23, 59, 0 ), TIME ( 0, 1, 0 ) )
Best Regards,
- ni307 years agoFrequent Visitor
Hi,
Thank you for your response. I am still not able to filter using start and end time tables as you have mentioned. When I select the End time the data table vanishes. Please find an example as below. Can you please advise how do I get the data filtered for time.
https://www.dropbox.com/s/h7ue7lcyaz487t9/Test_Table.pbix?dl=0
- v-jiascu-msft7 years ago
Microsoft Employee
Hi ni30,
1. The [Time] isn't a pure time in your demo. Please refer to the snapshot below. It should be [Time 2].
2. Since the Date and Time are two columns, I would suggest you make some changes like below. Remove one table and delete several relationships.
3. Create a measure.
Measure = VAR startTime = MIN ( startTimeTable[Value] ) VAR endTime = MAX ( endTimeTable[Value] ) RETURN IF ( MIN ( 'Sheet1'[Time 2] ) >= startTime && MIN ( Sheet1[Time 2] ) <= endTime, 1, BLANK () )
4. Add the measure in the Visual Level Filter and set it as "is not blank".
Please also download the demo from the attachment.
Best Regards,