Forum Discussion
Filtering measures with slicers
Hi, I have this measure:
And it it is working fine, but when I am using slicer it does not filter hours and just shows total for all of categories.
This is what I see
This is what I hoped it would show
And this is how I expect to act when slicer is selected
Does anyone know what I did wrong in the measure?
Thanks
Justas4478 , I really do not know you need filter in this case. But trylike
Hours for Absence =
CALCULATE(
SUM('System Work Hours'[Hours Total]),
Filter( 'System Data', 'System Data'[Absence] IN {
"Authorised Absence",
"Bank Holiday",
"Holiday",
"Maternity/Paternity",
"Sickness",
"Unauthorised"
}
))if it works - Difference in filtering data in CALCULATE with and without FILTER? - https://youtu.be/KDcmzwgPvXQ
Ideally this should work
SUM('System Work Hours'[Hours Total])
2 Replies
- amitchandakSuper User
Justas4478 , I really do not know you need filter in this case. But trylike
Hours for Absence =
CALCULATE(
SUM('System Work Hours'[Hours Total]),
Filter( 'System Data', 'System Data'[Absence] IN {
"Authorised Absence",
"Bank Holiday",
"Holiday",
"Maternity/Paternity",
"Sickness",
"Unauthorised"
}
))if it works - Difference in filtering data in CALCULATE with and without FILTER? - https://youtu.be/KDcmzwgPvXQ
Ideally this should work
SUM('System Work Hours'[Hours Total])
- AnonymousNot applicable
You do not need the filter in the Calculation. The table will work if you just use:
Hours for Absence = SUM('System Work Hours'[Hours Total])
The slicer will filter the table just fine for this.