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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Counting time values that is more than 00:00:05

Good Morning,

 

I am new to DAX and am struggling to find the formula for this. What I want to do it count anything in a coloumn that is greater than 00:00:05 seconds.

 

Attached is a picture of the collumn I need to calculate, sorry I cant show you more as this is sensitive data.

 

SRobinson94_0-1602575117105.png

Any comments are welcome 

 

Kind Regards,

Sam

9 REPLIES 9
amitchandak
Super User
Super User

@Anonymous , A new column

If(Table[col] >time(0,0,5),1,0)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
themistoklis
Community Champion
Community Champion

@Anonymous 

 

You can try the following formulas

Measure1 = CALCULATE(COUNT('SHEET1'[ID]),FILTER('SHEET1'[TIMEFIELD]>=TIME(0,0,5)))

Measure2 = CALCULATE(COUNT('SHEET1'[ID]),FILTER('SHEET1'[DATEFIELD]>=DATE(2020,10,12), 'SHEET1'[TIMEFIELD]>=TIME(0,0,5)))

 

Anonymous
Not applicable

@themistoklis 

 

The second measure is erroring giving me the following message:

 

SRobinson94_0-1602578906894.png

 

Sorry for being a pain 

 

Regards,

Sam

@Anonymous 

 

You forgot a comma between DATE(2020,01,01) ,   (and before eCRSStat)

 

Anonymous
Not applicable

@themistoklis 

 

With the comma it is still returning an error 

 

 

SRobinson94_0-1602579373859.png

 

Sorry @Anonymous 

 

Please replace comma with &&  (2 ampersand

Anonymous
Not applicable

@themistoklis 

 

The first measure gave me these results

 

SRobinson94_0-1602578670097.png

 

 

wdx223_Daniel
Super User
Super User

CALCULATE('TABLE'[COL],'TABLE'[COL]>=TIMEVALUE("00:00:05"))

some adjustments should be needed according to your model

Anonymous
Not applicable

@wdx223_Daniel  

 

Sorry, would this be a measure of an added column?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.