Forum Discussion
Using MAXX in a hierarchy
Hi Anonymous,
In this case you need to go to you lowest level of granularity that is the day redo your measure to:
MaxValue day =
CALCULATE(
MAXX(
VALUES('DIMDATE (2)'[Date]),
'Values'[value]))
Has you can see the result is correct at the day level:
PBIX file attach.
Hi!
Thanks for your reply!
However, this solution will only take the values from the one single date with the highest value.
It should use the highest value for every single unit, not only the one highest value
- MFelix4 years ago
Super User
Hi Anonymous ,
Can you please explain a little bit better how the calculation is done? Not sure if I understood how you are picking up the values.
When you refer that "The value for Group1 should be (3+3)/(20+20)=0.15"
Can you tell wich lines you are picking up on each of the values.
- Anonymous4 years agoNot applicable
Yes, I'll try to formulate it better!
I want to find the max values for each unit for each week.
In group 1 for units
Unit A Week 34: num=1, denom=10 (17.08)
Unit A Week 35: num=3, denom=20 (24.08)
-(because this gives a higher value than 23.08.2022 which is num=2, denom=20)
Unit B Week 34: num=0, denom=10 (17.08)
Unit B Week 35: num=3, denom=20 (24.08)
In group 1 for the group:
Values here are from the step above
Week 34: num=1+0, denom=10+10 --> value = 1/20
Week 35: num=3+3, denom=20+20 --> value = 3/20
This means week 35 is the largest, and the displayed value should be 0.15 for group 1.
I see that your caluclation gives the same, but that's just because of my unfortunate choice of values
Did it make any sense?
Thank you so much for taking the time to look at this!- Anonymous4 years agoNot applicable
Btw, It's not so important what is displayed in MaxValue on unit level, as long as the value at Group level is correct 🙂