Forum Discussion

joyeldavis007's avatar
joyeldavis007
Frequent Visitor
2 years ago

Measure values as rows in a table

Hi Guys,

i have a sample data as below and slicers for Emp Code and Date.


firstly i need to bucket the attendance of each employees .ie ,"below 2 " or "above 2" which is dynamic with the slicers.for this i have used the below measure which works fine.

Bucket =
var CountPerDate = CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'[Date]))
var b = IF(CountPerDate > 2, "Above 2","Below 2")
RETURN b

Now i need to create another table based on this bucket as below.


Both the bucket and % must be dynamic as it needed to change according to the slicers (Date&Emp code).
Can you guys please help me find a solution for the bucket & % table?

Calculation of % is number of employee in each bucket by the total employee.(eg :above-2 has 3 employees and below-2 has 2 employees then total employees will be 5 ,so bucket % for above-2 will be 3/5*100 = 60% and for below-2 it will be 2/5*100 = 40%. currently we dont need to include date info for any calculation.)


1 Reply