Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Average by a group

Hi, 

I've tried more than 20 other solutions on similar problemt - none have worked so far. 

 

I want to create a measure calculating the average category value share for each chain of stores (as seen below). this will then allow me to calculate any potentiale an underperforming store possesses.

The category value share is already calculated (measure).

Currently the wholesaler, chain and stores are stored in separate columns of the same table. 

 

Example below:

 category value sharecategory value share (chain)Potentiale
Chain10%10%-
 - Store 15%10%5%
 - Store 215%10%-

 

Following tables are used:

Table1 = Store data

Table2 = Category sales data

I have tried - among many others - the following:
= calculate(Table1[category value share],table1[chain])


Sincerely
Andreas D. 

6 Replies

  • SivaMani's avatar
    SivaMani
    Icon for Resident Rockstar rankResident Rockstar

    Anonymous, Did you try the below measure?

    calculate(AVERAGE(Table1[category value share]),ALL(table1[store]))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Siva,

      When using the average function it does not recognize the category value share measure.

      • SivaMani's avatar
        SivaMani
        Icon for Resident Rockstar rankResident Rockstar

        Anonymous, Is it already a measure? If yes, the AVERAGE function doesn't require 

         

        calculate([category value share],ALL(table1[store]))