Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How to show variance

Hi everyone,

I would like to show the variance of current year from past year in %.

Now I succeed to show the variance using the "line and clustered column chart", but it is represented as a "flow", while I would like to see it per each customer, not linked to the others. 

Do you have any suggestions how to do?

 

 

Thanks in advance for your help!

Valentina

 

 

1 Reply

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi Anonymous, 

     

    You can put the customer column in chart x axis, create a measure like below, see: 

     

    Variance = var LY=CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[Year]=2018 &&'Table'[Customer]=MAX('Table'[Customer])))
    var CY=CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[Year]=2019 &&'Table'[Customer]=MAX('Table'[Customer])))
    return 
    DIVIDE(CY-LY,LY)

     

     

    Best Regards,
    Qiuyun Yu