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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Kudoed Authors