Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Creating a market share

Hi Guys,

 

I want to create a market share type of measure but i have i bit of a complicated and large data.

 

I thought of using a measure where i divide the selected data from me by another selected data.

I have a lot of categories and a timeframe for around 3 years. I want my numerator to be the product/products from Category A(maybe use it as a page level filter) that i've selected (I've already grouped the products in a calculated column) and the denominator to be the whole category but i also want to select the date from a slicer. How do i do that?

 

Thanks in advance!

 

Edit: I think my formula should logicaly look like: "Sum of the values of the selected products from Category A"/"Sum of all values from Category A" for the selected date in the slicer

  • Anonymous

     

    Create a measure like the following:

    % Share = 
    VAR Volume =
        SUM('Table'[Sales])
    VAR AllVolume =
        CALCULATE ( SUM('Table'[Sales]),ALL('Table'[Calcuated_Column]) )
    RETURN
        DIVIDE ( Volume, AllVolume )

    And then create a new Table object and add your calculated column as dimension and next to it add then above measure

8 Replies

  • themistoklis's avatar
    themistoklis
    Community Champion

    Anonymous

     

    Create a measure like the following:

    % Share = 
    VAR Volume =
        SUM('Table'[Sales])
    VAR AllVolume =
        CALCULATE ( SUM('Table'[Sales]),ALL('Table'[Calcuated_Column]) )
    RETURN
        DIVIDE ( Volume, AllVolume )

    And then create a new Table object and add your calculated column as dimension and next to it add then above measure

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you themistoklis!

      What if I want to add another slicer for the products?

      • themistoklis's avatar
        themistoklis
        Community Champion

        Anonymous

         

        Can you please explain further what you are trying to do with the new slicer?