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,
I am trying to get a very simple (or so I thought it was) DAX expression for the following scenario:
I have sales for multiple brands and multiple geographies. I want to show geographies and what the % of total sales are for whatever Brand is filtered for all of the geographies.
Any ideas?
Any help?
Hi @Anonymous ,
You can use ALLEXCEPT() function.
Check the pbix as attached and refer to the formula see if it helps.
If you can show some sample data and expected out put then it will be great helpful.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you....One thing I failed to mention is that this formula is going to be in a decomposition tree, therefore when user selects first branch it would be brand, then they select next branch which would be sub-category, then next branch segment.
How do we account for different dimension as they drill through branches of decomp tree?
Hi @Anonymous ,
So basically you want sales for each brand/total sales in first branch, sales for each brand and geographies/total sales in second branch?
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
It actually looks pretty easy, but also it has a few solution.
So, please give an example of data model and desired output for more appropriated one
@Anonymous
just part of your data.
it could be dummy data, 10-15 rows to understand how exactly do you want to calculate it
I can try to write you a very common statement like
Measure =
DIVIDE(
CALCULATE(SUM(Table[Sales]), ALLEXCEPT(Table, Table[Brand], Table[Geography])),
CALCULATE(SUM(Table[Sales]), ALLEXCEPT(Table, Table[Geography]))
)
I hope it will help you
@az38 WIll that DAX work if this is meant for a decomposition where I continue clicking down a hierarchy?
@Anonymous
will it work or not depends on data model. in common case - yes, it will
you can share your Excel into cloud service and give the link here
@Anonymous
you can use option "Show value as" to get smth like this
@az38 when you put the data into a decomposition tree and filter on brands the numbers are not accurate. Try to do that on your end.
@Anonymous
you've got a lot of columns here. what do you want to achieve?
How do I attach the Excel dummy data?
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 |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |