Forum Discussion
Kolumam
Post Prodigy
7 years agoHow to filter timestamp using a calculated column or measure?
Hi All,
I need to filter the timestamp to show only between 6 AM and 8 PM. Please let me know how I can achieve this.
- Anonymous7 years ago
Hi Kolumam
Create another column to calculate the time.
Hour = HOUR(<datetime>)
Then filter according to this new column. Use the built in filtering mechanism.
6 >= Hour >= 20
Cheers!
A
3 Replies
- AnonymousNot applicable
Hi Kolumam
Create another column to calculate the time.
Hour = HOUR(<datetime>)
Then filter according to this new column. Use the built in filtering mechanism.
6 >= Hour >= 20
Cheers!
A - jdbuchanan71
Super User
Hello Kolumam
You could do it with a measure like this.
Amount Filtered = CALCULATE( SUM ( 'Table'[Amount] ), FILTER ( 'Table', 'Table'[Time] >= TIME(6,0,0) && 'Table'[Time] <= TIME (20,0,0) ) )Then put that measure in your chart.
- Kolumam
Post Prodigy
Thanks both!
jdbuchanan71 Anonymous