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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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