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 Everyone,
Still new to Power BI and getting better at DAX but this one stumps me. For hours. And hours. Please someone smarter than me help!
Desired outcome:
Determine the number of orders per month by region for my organization, the entire brand (including me), and everyone in the entire brand (excluding me). I have solved the first two but cannot create correct DAX for orders for everyone in the entire brand except me.
My Data:
I have a table called 'Door_Dash2'.
I have created a many to one relationship with 'Door_Dash2' [Site Number] to 'Store Attributes' [Unit Number].
My slicer:
I have a slicer using the 'Store Attributes'[Number/Region] field. This allows me to switch between nine different regions.
Good Measures (Measures that work with slicer):
Orders Avg My Organization= CALCULATE( AVERAGE('Door_Dash2'[Orders]), 'Door_Dash2'[ Combination Name] IN { "MY ORGANIZATION" } )
that works. this works too:
Orders Avg ALL INCLUDING MY ORGANIZATION = CALCULATE( AVERAGE('Door_Dash2'[Orders]) ,ALL('Door_Dash2'[ Site Number]) ,ALL('Store Attributes'[Number/Region] ))
Bad measure (Measure that does not work with slicer):
but i can't figure out how to write DAX for average orders for all, excluding my organization.
What I tried:
Orders Avg ALL EXCLUDING MY ORGANIZATION = CALCULATE( AVERAGE('Door_Dash2'[Orders]), 'Door_Dash'[ Combination Name] <> { "MY ORGANIZATION" } )
This returns the same value as Orders Average My Organization.
I suspect this is because the slicer of 'Store Attributes'[Number/Region].
The issue with my data is that not every 'Door_Dash2'[ Site Number] has a'Store Attributes'[Number/Region].
This is because I do not own all the stores in 'Door_Dash2'. There are other organizations who own sites.
Summary:
In summary, I need a DAX expression that calculates the average orders for all sites, excluding my sites filtered by region using my slicer.
Sample data:
https://docs.google.com/spreadsheets/d/1ghXDw_l2h_B0MeNffUZtFdiy-AInsMk15RoIqQNIsHU/edit?usp=sharing
Thanks so much for looking at this!
Solved! Go to Solution.
Hi @Anonymous,
Thanks for your understanding and if your problem could be closed, could you please mark the reply as Answered?
Regards,
Daniel He
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |