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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors