Forum Discussion

rwelsh11's avatar
rwelsh11
Frequent Visitor
8 years ago
Solved

Calculating Market Share Over Time

I am trying to display the marketshare for various accounts over time and am struggling with which DAX formula to use. I have a simple table (Week Ending Date, Account Name, Units Sold). I would like...
  • v-ljerr-msft's avatar
    8 years ago

    Hi rwelsh11,

     

    Could you try using the formula below to create a new measure to calculate marketshare, then show the measure as Values, "Week Ending Date" as Axis, and "Account Name" as Legend on the Line Chart visual to see if it works in your scenario? :smileyhappy:

    measure =
    DIVIDE (
        SUM ( 'Table1'[Week End Date] ),
        CALCULATE ( SUM ( 'Table1'[Week End Date] ), ALL ( 'Table1'[Account] ) )
    )
    

    Remark: replace 'Table1' with your real table name.

     

    Regards