Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all.
I am trying to create a series of calculations using Dax, and I am stuck on a piece.
Context: First, I need to calc market share - how much is our account selling of a specific product within the entire geography. Then I would compare that to how much the total account sells in their geopgrahy (aka Fair Share). Then I calculate a gap between those two to see if the account is selling less or more than their share of the product.
Pieces:
Market Share =
var _numerator = CALCULATE(sum(Account[Dollars]))
var _denominator = [Total Market Dollars]
return DIVIDE(_numerator, _denominator)
Current "Fair Share" formula:
FairShare = CALCULATE([Market Share],ClientList[Client]="Total Departments")
Result:
The formula won't go down. Now, in this table, there is a duplication of the products listed below
I've also tried this version of the formula (the table is filtered using the Representation column):
FairShare = CALCULATE([Market Share],ALL(ClientList[Client]),ClientList[Client]="Total Departments",REMOVEFILTERS(Representation[Representation]))
Any ideas?? Thank you!
Hi @JillHenninger ,
Has your problem been solved?
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
Hi,
Does this measure work?
FairShare = CALCULATE([Market Share],all(ClientList[Client]))
If it does not work, then share the link from where i can download your PBI file.
Hi @JillHenninger ,
Try the following formula:
Measure =
SUMX(
FILTER(
ALLSELECTED(ClientList[Client]),
ClientList[Client] = "Total Departments"
),
[Market Share]
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! Alas, that formula have me the exact same result (14.8%) as before and as before, only for the top row...
Hi @JillHenninger ,
Could you please share the relationship between the tables in the Model view?
In your Fair Share formula I see that you have restrictions on client
ClientList[Client]="Total Departments",
so the calculation result you want is consistent (14.8%)?
Best Regards,
Winniz
Sure - here is the model. TA and xAOC are the made data sources; the rest are mapping files.
My products are Total Departments (ie the total retailer), then Clients (ie manufacturers). The clients don't total up to the Total Departments; and Total Departments is a singular product pulled from our system. So, it will change as retailer and time period changes. But - I don't want it to change depending the product (row) displayed...
Hi @JillHenninger ,
If I understand correctly, the Client column in your matrix is the column of the Representation table. So you need to modify the measure to
FairShare = CALCULATE([Market Share], Representation[Client] = "Total Departments")
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
107 | |
99 | |
99 | |
38 | |
37 |
User | Count |
---|---|
157 | |
121 | |
73 | |
73 | |
63 |