Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All, I have a measure below which calculates the number of hours lost over a date range but also includes the 3 months prior based on the earliest date selected in the date filter. I am trying to get an average result which it is producing but also includes months where there are no hours lost. I only want the result to show an average where there are months with hours lost. Any ideas?
This is the measure being used.
Average Hours Lost Over Date Range and 3 Months = CALCULATE(
SUM('07 - COVID Absence Record'[Hours Lost (4)]),
DATESBETWEEN('01. Date Table'[Date],
FIRSTDATE('01. Date Table'[Date Minus 3 Months]),
LASTDATE('01. Date Table'[Date])))
/
ROUNDDOWN(((ROUND(LASTDATE('01. Date Table'[Date]) - FIRSTDATE('01. Date Table'[Date Minus 3 Months]),0)) / 7),0)
Solved! Go to Solution.
Hi, @Luke_Howells ;
Hi, @Luke_Howells ;
Hi, @Luke_Howells ;
You can modify your measure by adding filter ('07 - COVID Absence Record'[Hours Lost (4)]<>blank()),
Or additionally create a measure to count the total number of non-zero months;
Or Could you please consdier sharing a sample file without any sesentive information and posting expected result so it is clear on your logic?
It makes it easier to give you a solution.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Luke_Howells ,
Have you tried to use is not blank filter on your visual.
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |