Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |