Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I would like to calculate the market share (% value) of the category per vendor.
As per below, what is the % value of the total spend per color per vendor?
Any help would be appreciated.
Her is the data table:
Vendor Name | Color | Spend$ |
x | Blue | 10 |
y | Blue | 30 |
z | Blue | 20 |
y | Red | 40 |
x | Red | 20 |
z | Red | 50 |
Total | 170 |
Color | Spend$ |
Blue | 60 |
Red | 110 |
Total | 170 |
Result:
Vendor Name | Color | % of Spend per Color per vendor |
x | Blue | 17% |
y | Blue | 50% |
z | Blue | 33% |
x | Red | 18% |
y | Red | 36% |
z | Red | 45% |
Solved! Go to Solution.
Hi @Pedro14
Try this measure:
Measure =
Var _TotalC = CALCULATE(sum('Table'[Spend$]),filter(ALL('Table'),'Table'[Color]=max('Table'[Color])))
Var _SC = max('Table'[Spend$])
return
_SC/_TotalC
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @Pedro14
Try this measure:
Measure =
Var _TotalC = CALCULATE(sum('Table'[Spend$]),filter(ALL('Table'),'Table'[Color]=max('Table'[Color])))
Var _SC = max('Table'[Spend$])
return
_SC/_TotalC
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Thanks a lot. It works!
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
14 | |
11 | |
9 |