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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Fusilier2
Helper V
Helper V

Help with DAX measure - Count values if > than

Hi,

Struggling with a DAX measure. Hope somebody can help?

I have a table listing employees and the number of days sickness thay have had in a particular month.

I'm trying to create a measure to count the number of instances where sickness days were greater than 27..

So far I have got this measure:

Number of LTS Incidents = COUNT(Sickness[Calendar Days])>27
Which is giving the answer True. instead of a number.
Can anybody advise me where I am going wrong please? I'm sure this is a pretty simple DAX calculation, I just can't work it out!
 
Thanks in advance.

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Anonymous  Thanks for your contribution on this thread.

Hi @Fusilier2 ,

@Anonymous has provide the solution, please check if it can return your expected result.

Measure = CALCULATE(DISTINCTCOUNT('Table'[Employee No]),'Table'[Calendar Days]>27)

vyiruanmsft_0-1713945818686.png

Best Regards

View solution in original post

Anonymous
Not applicable

calculate(sum(calendar days), calendar days > 27)

View solution in original post

9 REPLIES 9
Fusilier2
Helper V
Helper V

Thank you so much, your help is really appreciated. 

I was part way there! Much to learn in DAX...

Anonymous
Not applicable

Much to learn, keep going!

Fusilier2
Helper V
Helper V

Here's some sample data:

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

The measure should be returning the value 4

Anonymous
Not applicable

calculate(distinctcount(employer No), calendar days > 27)

Anonymous
Not applicable

That's because your measure is asking if the count of sickness days is greater than 27, not counting the number of instances that the number of days was over 27. 

If you can show a sample of data with no sensitive information, that'd help

Thanks. I've uploaded some sample data above.

Anonymous
Not applicable

@Anonymous  Thanks for your contribution on this thread.

Hi @Fusilier2 ,

@Anonymous has provide the solution, please check if it can return your expected result.

Measure = CALCULATE(DISTINCTCOUNT('Table'[Employee No]),'Table'[Calendar Days]>27)

vyiruanmsft_0-1713945818686.png

Best Regards

That worked. Thank you.

How would I change the DAX expression to sum all the calendar days greater than 27 instead of count the instances?

Anonymous
Not applicable

calculate(sum(calendar days), calendar days > 27)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.