Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello all,
My request is a bit "tricky" so i tried to simplified it the most.
My data ("Value") are stored in a date/hour database, with a value each hour.
I created a date/time table to link all my data.
I want to show a table with :
day_average =
AVERAGEX( ALL(Table_date[Date_heure]), CALCULATE( [Value], VALUES (Table_date[Date] ) ))
The table will be "filtered" by slicers, especially "hour" slicer, which will reduce the size of a the days.
To do so, I already created measures, but I’m facing an issue.
The measure that calculates the "day average" values works. But it is not affected by slicers. If I want to shorten day with the slicer by 10h-19h instead of 0h-23h, the result of this measure will not change. I tried to replace the
ALL()
by
ALLSELECTED()
whitout any change of the results.
I found a "workaround" (right table in the image) wich consists of showing a table with date/day lines (instead of date/time/hour). I add a mesure to calculate the max value of a day, and the average value. The results of these two measures are properly affected by slicers.
So, for the date/hour table, how can I write a mesure which will calculate the day average, and take care of slicers values ?
Thanks for your help.
Solved! Go to Solution.
As I continue to investigate by my side, I think I found out the issue.
Sometimes, the "Value" (which is calculated) is shown as "infiny"
When I get rid of the "infiny" value in the filter pannel, and replace ALL by ALLSELECTED in the measure, it finally works !
day_average =
AVERAGEX( ALLSELECTED(Table_date[Date_heure]), CALCULATE( [Value], VALUES (Table_date[Date] ) ))
As I continue to investigate by my side, I think I found out the issue.
Sometimes, the "Value" (which is calculated) is shown as "infiny"
When I get rid of the "infiny" value in the filter pannel, and replace ALL by ALLSELECTED in the measure, it finally works !
day_average =
AVERAGEX( ALLSELECTED(Table_date[Date_heure]), CALCULATE( [Value], VALUES (Table_date[Date] ) ))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |