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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.