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,
This countif or the DAX version of it is my kryptonite for sure...
I have a task that's really easy to do in Excel and I'm pretty sure can be done in Power BI but I can't figure it out how.
I have a dataset like this:
What I want to do is to count the days where the sum of the spent_hours for a given site is higher than a preset formula (sum of all hours for that site for the week and divided by 14).
So for example for site 1 the value I want to compare to is 0,382643 (sum of all hours for week29 divided by 14) and the end result I want to see is 2 because on days 09.11. and 09.12. the sum of spent_hours are higher than the one I've calculated.
Is there a way to do this in a DAX formula? Or should I add a new table that calculates the daily spent_hours (so takes out the report_type column)? Or is there a better method? All ideas are welcome. 🙂
(I don't know if it's important but country, cluster, week and site are all in slicers.)
Solved! Go to Solution.
Sounds like you want to use SUMMARIZE to summarize your data and then COUNTX with a FILTER to filter it down to just what you want.
Sounds like you want to use SUMMARIZE to summarize your data and then COUNTX with a FILTER to filter it down to just what you want.
Thank, this seems to be working!
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 |
---|---|
113 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |