Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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.

dorayeh161923_0-1650850994997.png

Brs,

Dora.

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
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:

vchenwuzmsft_0-1651052482556.png

 

 

 

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.

View solution in original post

3 REPLIES 3
v-chenwuz-msft
Community Support
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:

vchenwuzmsft_0-1651052482556.png

 

 

 

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.

amitchandak
Super User
Super User

@Anonymous , Based on what I got

A new column

datediff([Starttime],[endtime], minute)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak ,

I want to show the table like this,and time series change to one minute.

dorayeh161923_0-1650853229694.png

I take reference https://community.powerbi.com/t5/Desktop/Start-and-end-time/m-p/756870?msclkid=255ce3abc43e11ecac1bb... ,however it didn't work.

If you have any suggestion , please help me,thanks a lot.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.