Forum Discussion
comparing values based on slicers
Hi,
I want to display a company's ranking count and it's competitors count for different products and subproducts in 100% stacked bar chart. When a user pass a particular company name through parameter, the ranking count for this company and it's competitors should be calculated based on the values selected in multiple slicers by the user. The competitors nos. should not include the selected company and use rank in the legend.
I have two challenges to achieve this:
1. How to calculate ranking count for company and competitors based on the values selected in the slicers
2. How to display them on a single visual (100% stacked bar chart)
In the below screenshot, the visual in the lower section is ideal to display the information but it is comingup with a paid license not a free visual:
Thanks
7 Replies
- v-yanjiang-msftCommunity Support
Hi Anonymous ,
Sorry I can't reproduce your sample, could you please provide more details about your sample? Companies are in the column Company Name, what chout competitors, are they in the same table in another column? Then how to distinguish the value of company and competitor.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi v-yanjiang-msft ,
Yes, companies are in column Company Name and competitors are also in the same column. The Company Name will be provided through a parameter and competitors will be considered based on the selected values in the slicers within filter criteria and will not include the company against which we are going to compare.
Also, this report will be embedded within a sharpoint site and Client name parameter will be passed at there only.
the below is the sample data:
CompanyRankProductSub ProductsCountryPriceNo. of Customers
A Bad Phone Battery India 30000 250000 B Good TV Headphone US 5000 50000 C Excellent TV Speaker Germany 60000 134000 D Good TV Speaker Germany 70000 300000 A Excellent Phone Battery India 12000 20000 B Bad TV Speaker India 30000 90000 C Good Phone Phone Cover US 3000 120000 D Excellent Phone Phone Cover Germany 90000 230000 A Good TV Headphone Germany 50000 34000 B Bad Phone Phone Cover India 80000 250000 C Good TV Headphone US 7000 70000 D Excellent Phone Phone Cover Germany 13000 170000 C Excellent TV Speaker Germany 60000 134000 D Good TV Speaker Germany 70000 300000 A Excellent Phone Battery India 12000 20000 B Bad TV Speaker India 30000 90000 C Good Phone Phone Cover US 3000 120000 A Excellent Phone Battery India 12000 20000 B Bad TV Speaker India 30000 90000 C Good Phone Phone Cover US 3000 120000 D Excellent Phone Phone Cover Germany 90000 230000 A Good TV Headphone Germany 50000 34000 B Bad Phone Phone Cover India 80000 250000 C Good TV Headphone US 7000 70000 D Excellent Phone Phone Cover Germany 13000 170000 C Excellent TV Speaker Germany 60000 134000 B Bad TV Speaker India 30000 90000 C Good Phone Phone Cover US 3000 120000 A Excellent Phone Battery India 12000 20000 B Bad TV Speaker India 30000 90000 C Good Phone Phone Cover US 3000 120000 D Excellent Phone Phone Cover Germany 90000 230000 A Good TV Headphone Germany 50000 34000 B Bad Phone Phone Cover India 80000 250000 C Good TV Headphone US 7000 70000 D Excellent Phone Phone Cover Germany 13000 170000 C Excellent TV Speaker Germany 60000 134000 D Good TV Speaker Germany 70000 300000 A Excellent Phone Battery India 12000 20000 B Bad TV Speaker India 30000 90000 C Good Phone Phone Cover US 3000 120000 A Excellent Phone Battery India 12000 20000 B Bad TV Speaker India 30000 90000 C Good Phone Phone Cover US 3000 120000 D Excellent Phone Phone Cover Germany 90000 230000 A Good TV Headphone Germany 50000 34000 B Bad Phone Phone Cover India 80000 250000 C Good TV Headphone US 7000 70000 D Excellent Phone Phone Cover Germany 13000 170000 C Excellent TV Speaker Germany 60000 134000 Thanks
- v-yanjiang-msftCommunity Support
Hi Anonymous ,
According to your description, here's my solution.
1.Create a new table.
Table 2 = VALUES('Table'[Company])There's no relationship of the two tables.
2.Create a measure.
Check = IF(SELECTEDVALUE('Table 2'[Company])=MAX('Table'[Company]),1,0)3.For the company visual, put Product and Company in Axis, Rank in legend and values, put the measure in the visual filter and set its value is 1.
The same for the competitor visual, but set the measure is 0.
4.Put the company column in the new table into a slicer, then get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.