Forum Discussion

Patrick2's avatar
Patrick2
New Member
8 years ago
Solved

Dynamic calculation of key performance indicators

Good day,

 

We are building a dashboard for our sales team. There are multiple key performance indicators (KPI) which categorize our clients. In my example here we use: MEAN, MAX, SUM and STD.  

 

Now, we want the KPI to re-calculate based on the filter "year". 

 

 

Example 

 

MEAN (over all years): 0,07

Click on Filter 2016

Power BI recalculates the Field

MEAN (for 2016 only): X,XX

 

Our current simplified setup looks like this

 

 

 

Wert = SUMMARIZE('Shipments';'Shipments'[Local Client];"SUM";CALCULATE(SUM(Shipments[Value])); 
"MAX"; CALCULATE(MAX(Shipments[Value])); "MEAN"; CALCULATE(AVERAGE(Shipments[Value]));
"STD"; CALCULATE(SQRT(VAR.P(Shipments[Value]))))

 

Right now the values won't re-calculate. 

 

What are we missing?

 

Thank you very much

 

 

  • Hi Patrick2,

     

    As calculated table data is static since it is initialized, it won't dynamically change depend on slicer selection. To achieve your requirement, you should create measures:

     

    MEAN=AVERAGE(Shipments[Value])
    MAX=MAX(Shipments[Value])
    SUM=SUM(Shipments[Value])
    STD=CALCULATE(SQRT(VAR.P(Shipments[Value])))

     

    Add above measures and 'Shipments'[Local client] into visual.

     

    Regards,

    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Patrick2,

     

    As calculated table data is static since it is initialized, it won't dynamically change depend on slicer selection. To achieve your requirement, you should create measures:

     

    MEAN=AVERAGE(Shipments[Value])
    MAX=MAX(Shipments[Value])
    SUM=SUM(Shipments[Value])
    STD=CALCULATE(SQRT(VAR.P(Shipments[Value])))

     

    Add above measures and 'Shipments'[Local client] into visual.

     

    Regards,

    Yuliana Gu