Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |