Forum Discussion
Column based filtering
absence ratio= SickLeave (h)+ Holliday (h)+ Vacation (h) / WorkingHour
OK, so what would the slicer do then?
This absence ratio can be written as a DAX Measure like this:
Absence Ratio =
DIVIDE(
SUM('tableName'[SickLeave(h)]) + SUM('tableName'[Holliday(h)]) + SUM('tableName'[Vacation (h)]),
'tableName'[WorkingHour],
0
)
Note, the use of DIVIDE is better than the / operator because the third argument specifies what to return in a divide-by-zero scenario. In this instance I have set the return value to 0 if that happens.
This measure could be sliced by Name in any sort of query context from a visualization. For example, you could set the rows in a matrix to Name and the Values in the matrix to Absence Ratio and see a list of ratios for each individual.