Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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:
Solved! Go to Solution.
@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)
Best Regards
calculate(sum(calendar days), calendar days > 27)
Thank you so much, your help is really appreciated.
I was part way there! Much to learn in DAX...
Much to learn, keep going!
Here's some sample data:
The measure should be returning the value 4
calculate(distinctcount(employer No), calendar days > 27)
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 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)
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?
calculate(sum(calendar days), calendar days > 27)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
15 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |