Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi!
So I have a problem with calculating the max values correctly on group level, and I can't wrap my head around it. Have actually spent days, and would really love some input
I have groups, that consist of several units. And in those units a value (numerator/denominator) is calculated.
This is my model:
The challenge is in the measure MaxValue, that is:
The value for Group1 should be (3+3)/(20+20)=0.15
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.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi!
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
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.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsYes, 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!
Btw, It's not so important what is displayed in MaxValue on unit level, as long as the value at Group level is correct 🙂
User | Count |
---|---|
118 | |
66 | |
65 | |
56 | |
50 |
User | Count |
---|---|
182 | |
85 | |
67 | |
61 | |
53 |