Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hello guys,
I have troubles trying to find way to solve this calculation. I need the average of max delivered days values grouped by num order
I try with this measure
delivered days grouped = SUMX(VALUES(Time[NumOrder]) ,MAX(Time[Delivereddays]) )
and then
avg days = DIVIDE([delivered days grouped],[Orders],0)
But what i obtain is 11 and i dont know why, please can you help me?
Solved! Go to Solution.
Hi @jpereztang
You can try this:
= VAR x = SUMMARIZE ( 'Time'; 'Time'[Num Order]; "dd"; MAX ( 'Time'[Delivered Days] ) ) RETURN AVERAGEX ( x; [dd] )
Hi @jpereztang
If you just wrap a CALCULATE around the MAX() in your first measure it should work. The current problem is that with no calculate there is no context transition and MAX() always yields 11, the max for the full [Delivered days] column.
Hi @jpereztang
If you just wrap a CALCULATE around the MAX() in your first measure it should work. The current problem is that with no calculate there is no context transition and MAX() always yields 11, the max for the full [Delivered days] column.
@AlB this also works, i couldn't figure out why this measure doesn't work if in the past work for similar scenario and as you say is because i was omitted calculate. Thank you!
Hi @jpereztang
You can try this:
= VAR x = SUMMARIZE ( 'Time'; 'Time'[Num Order]; "dd"; MAX ( 'Time'[Delivered Days] ) ) RETURN AVERAGEX ( x; [dd] )
at first sight it fits perfectly. Thank you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
77 | |
62 | |
47 | |
39 |
User | Count |
---|---|
118 | |
85 | |
81 | |
58 | |
39 |