Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi everyone,
I'm new to Power BI and Dax and currently I have some Problems with one of my Measures.
I need to count the Days where an Employee booked more than 10 hours workingtime.
The raw Data looks like that. One Employee can book multiple timebits per day.
I tried follwing DAX Expression:
GT10H = CALCULATE(COUNTROWS(DimDate),FILTER(fact_timebits,SUM(fact_timebits[hours])>10))
Of cause the Result is 3, because the total Sum of hours for the three Days is greater than 10. Is there a possibility to only take the daily workingtime into consideration, so i get 1 as result ?
Thanks for your help!!
Solved! Go to Solution.
@Anonymous
Can you try this measure:
GT10H =
COUNTROWS(
FILTER(
SUMMARIZE(
fact_timebits,
fact_timebits[Date],
"Total", CALCULATE(SUM(fact_timebits[hours]))
),
"Total">10)
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous , Try measures like
Hours =SUM(fact_timebits[hours])
GT10H = CALCULATE(COUNTROWS(DimDate),values(DimDate[date]),FILTER(fact_timebits,[Hours] >10))
sumx(filter(Values(DimDate[date]), [Hours] >10),COUNTROWS(DimDate))
@Anonymous
Can you try this measure:
GT10H =
COUNTROWS(
FILTER(
SUMMARIZE(
fact_timebits,
fact_timebits[Date],
"Total", CALCULATE(SUM(fact_timebits[hours]))
),
"Total">10)
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |