Forum Discussion

qwertzuiop's avatar
qwertzuiop
Advocate III
6 years ago
Solved

create a measure that counts same time

Dear PowerBI Community

 

First of all: Good luck for 2020!

 

I have the following question:

I want to create a measure that returns me the number of times the time 01:00 occurs in the column

 

For example, the measure for this table should return the number "4".

Think its not easy because its not an interger to check.

So the following expression does not work: 

measure = COUNTX(FILTER('table';[timeOfCreation]=01:00))

 

timeOfCreation
01:00
02:00
03:00
01:00
02:00
01:00
03:00
01:00

 

Thank you so much for your help.

 

Cheers!

qwertzuiop

  • Hi qwertzuiop 

     

    Try below. If not working, then share the data type for timeOfCreation columns.

    measure5 = COUNTX(FILTER('table5',[timeOfCreation]="01:00"),Table5[timeOfCreation])

     

    Thanks
    Ankit Jain
    Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.

2 Replies