Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I'm trying to create a "Market Size" formula that calculates the relevant market size per brand.
"Market Size" is considered as the sum of sales for all countries that brand is sold in.
Example: If a brand sells in the UK & France, i want to return the SUM of Sales for all brands within UK & France.
I’ve been using ALLEXCEPT, and this works fine when I have the Country field in my visual, but if take it out of my table it no longer works as expected, and instead returns the SUM of Sales for the entire dataset, for every row in my visual.
Every search I do comes back to ALLEXCEPT, but I’m clearly missing something, or using the wrong formula.
My calculation is:
CALCULATE( SUM('Sales'[Sales]), ALLEXCEPT('Sales', 'Sales'[Country]) )
Any help would be greatly appreciated.
Solved! Go to Solution.
ALLEXCEPT is a rather blunt tool. Try something more surgical like REMOVEFILTERS.
Var countries = values( 'Sales'[Country] )
Return
CALCULATE(
SUM('Sales'[Sales]),
ALLSELECTED(),
countries
)
Hi @03clacey,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thanks and regards
Hi @03clacey ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @03clacey,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Var countries = values( 'Sales'[Country] )
Return
CALCULATE(
SUM('Sales'[Sales]),
ALLSELECTED(),
countries
)
ALLEXCEPT is a rather blunt tool. Try something more surgical like REMOVEFILTERS.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 39 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 34 | |
| 33 | |
| 30 |