Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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

  • 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 _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not 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

      ABadPhoneBatteryIndia30000250000
      BGoodTVHeadphoneUS500050000
      CExcellentTVSpeakerGermany60000134000
      DGoodTVSpeakerGermany70000300000
      AExcellentPhoneBatteryIndia1200020000
      BBadTVSpeakerIndia3000090000
      CGoodPhonePhone CoverUS3000120000
      DExcellentPhonePhone CoverGermany90000230000
      AGoodTVHeadphoneGermany5000034000
      BBadPhonePhone CoverIndia80000250000
      CGoodTVHeadphoneUS700070000
      DExcellentPhonePhone CoverGermany13000170000
      CExcellentTVSpeakerGermany60000134000
      DGoodTVSpeakerGermany70000300000
      AExcellentPhoneBatteryIndia1200020000
      BBadTVSpeakerIndia3000090000
      CGoodPhonePhone CoverUS3000120000
      AExcellentPhoneBatteryIndia1200020000
      BBadTVSpeakerIndia3000090000
      CGoodPhonePhone CoverUS3000120000
      DExcellentPhonePhone CoverGermany90000230000
      AGoodTVHeadphoneGermany5000034000
      BBadPhonePhone CoverIndia80000250000
      CGoodTVHeadphoneUS700070000
      DExcellentPhonePhone CoverGermany13000170000
      CExcellentTVSpeakerGermany60000134000
      BBadTVSpeakerIndia3000090000
      CGoodPhonePhone CoverUS3000120000
      AExcellentPhoneBatteryIndia1200020000
      BBadTVSpeakerIndia3000090000
      CGoodPhonePhone CoverUS3000120000
      DExcellentPhonePhone CoverGermany90000230000
      AGoodTVHeadphoneGermany5000034000
      BBadPhonePhone CoverIndia80000250000
      CGoodTVHeadphoneUS700070000
      DExcellentPhonePhone CoverGermany13000170000
      CExcellentTVSpeakerGermany60000134000
      DGoodTVSpeakerGermany70000300000
      AExcellentPhoneBatteryIndia1200020000
      BBadTVSpeakerIndia3000090000
      CGoodPhonePhone CoverUS3000120000
      AExcellentPhoneBatteryIndia1200020000
      BBadTVSpeakerIndia3000090000
      CGoodPhonePhone CoverUS3000120000
      DExcellentPhonePhone CoverGermany90000230000
      AGoodTVHeadphoneGermany5000034000
      BBadPhonePhone CoverIndia80000250000
      CGoodTVHeadphoneUS700070000
      DExcellentPhonePhone CoverGermany13000170000
      CExcellentTVSpeakerGermany60000134000

       

      Thanks

      • v-yanjiang-msft's avatar
        v-yanjiang-msft
        Community 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 _ kalyj

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.