Forum Discussion
spandy34
3 years agoResponsive Resident
Count filtered time fields
I was wondering if you could help me please. I want to create a measure called z_15min Commission the counts all the SSRef fields where there is 00:15:00 in the Planned Duration field. Planned Duration is a Time format field . I tried below but get an error.
Thank you very much
z_15min Commission = CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Planned Duration]= "00:15:00")
z_15min Commission = CALCULATE( COUNTA('Procurement_Main_Data'[SSRef]), 'Procurement_Main_Data'[Planned Duration]>= TIMEVALUE("00:00:00")&& 'Procurement_Main_Data'[Planned Duration]<= TIMEVALUE("00:17:00") )no need to copy measure and paste. must be written by hand
9 Replies
- AhmedxSuper User
write like this:
z_15min Commission = CALCULATE( COUNTA('Procurement_Main_Data'[SSRef]), 'Procurement_Main_Data'[Planned Duration]= TIMEVALUE("00:15:00"))- spandy34Responsive Resident
That is great thank you.
What would the DAX be if I wanted the Planned Duration between 0 and 17 mins as opposed to 15mins please?
- AhmedxSuper User
I didn't understand you, is that what you mean?
z_15мин Комиссия = РАСЧЕТ( COUNTA('Procurement_Main_Data'[SSRef]), 'Procurement_Main_Data'[Запланированная продолжительность] = TIMEVALUE("00:17:00"))- spandy34Responsive Resident
Hi no . I want to Count SSRef where the 'Procurrment Main Data'[Planned Duration] is between 00:00:00 and 00:17:00
thank you
- AhmedxSuper User
z_15min Commission = CALCULATE( COUNTA('Procurement_Main_Data'[SSRef]), 'Procurement_Main_Data'[Planned Duration]>= TIMEVALUE("00:00:00")&& 'Procurement_Main_Data'[Planned Duration]<= TIMEVALUE("00:17:00") )