Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hey all,
I have a date table with employees ids, dates,hours for each day and a helper column to identify the number of each day.
What i want is to count how many days for each week period(or month or..) EACH agent worked and then create a % of weekend days worked / total days worked for the selected period.
I tried the one below which counts correct if i select from the slicer each agent but doesn't sum correct if i select more than one emploeyee or if i clean the slicer .
Any suggestion would be appreciated!
Cheers
Solved! Go to Solution.
@_Melenios_ , Sorry, My mistake
CALCULATE(countrows(SUMMARIZE(FACT_Wrkd, FACT_Wrkd[Data],FACT_Wrkd[agent])),
FILTER(FACT_Wrkd,
FACT_Wrkd[Day Name] = 6 || FACT_Wrkd[Day Name] = 7))
@_Melenios_ , Try like
CALCULATE(SUMMARIZE(FACT_Wrkd, FACT_Wrkd[Data],FACT_Wrkd[agent]),
FILTER(FACT_Wrkd,
FACT_Wrkd[Day Name] = 6 || FACT_Wrkd[Day Name] = 7))
Hi @amitchandak ,
Thanks for your suggestion but, unfortunatelly I get this error if i filter some employees :
" A table of multiple values was supplied where a single value was expected"
and in some others it's returning just the real date of a weekend instead of the count of weekend days.
Cheers
@_Melenios_ , Sorry, My mistake
CALCULATE(countrows(SUMMARIZE(FACT_Wrkd, FACT_Wrkd[Data],FACT_Wrkd[agent])),
FILTER(FACT_Wrkd,
FACT_Wrkd[Day Name] = 6 || FACT_Wrkd[Day Name] = 7))
User | Count |
---|---|
82 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
105 | |
97 | |
86 | |
68 |