Forum Discussion
Start time and End time
Hi everyone,
I want to count item in mintute series, and i have to colum start time and end time.
Which means i can find how many item in 8:46-8:47, or 8:50-8:51.
How to write DAX to show this, please help me,thanks.
Brs,
Dora.
Hi Anonymous ,
I think you want something like this.
Create a Time interval table by the expression below. Interval time is 30 min
Time = GENERATESERIES(TIME(0,0,0),TIME(23,59,59),TIME(0,30,0))
Creat a measure like the following:
Measure = COUNTROWS ( FILTER ( 'Table', TIMEVALUE ( [Start] ) < SELECTEDVALUE ( 'Time'[Start] ) && TIMEVALUE ( [End] ) > SELECTEDVALUE ( 'Time'[End] ) ) )The final reault:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- amitchandak
Super User
Anonymous , Based on what I got
A new column
datediff([Starttime],[endtime], minute)
- AnonymousNot applicable
Hi amitchandak ,
I want to show the table like this,and time series change to one minute.
I take reference https://community.powerbi.com/t5/Desktop/Start-and-end-time/m-p/756870?msclkid=255ce3abc43e11ecac1bb99573ecbaef ,however it didn't work.
If you have any suggestion , please help me,thanks a lot.
- v-chenwuz-msft
Community Support
Hi Anonymous ,
I think you want something like this.
Create a Time interval table by the expression below. Interval time is 30 min
Time = GENERATESERIES(TIME(0,0,0),TIME(23,59,59),TIME(0,30,0))
Creat a measure like the following:
Measure = COUNTROWS ( FILTER ( 'Table', TIMEVALUE ( [Start] ) < SELECTEDVALUE ( 'Time'[Start] ) && TIMEVALUE ( [End] ) > SELECTEDVALUE ( 'Time'[End] ) ) )The final reault:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.