Forum Discussion

arimoldi's avatar
arimoldi
Resolver II
2 years ago
Solved

Line and Stacked Column Chart - Trend Line Percentage

Hi,

 

I want to insert a card/table that shows the percentage of increase/decrease of the trend line in a stacked column chart:

 

 

in this case there is a difference from 65 to 49, so 16 which means a decrease around 24%.

 

How can I achieve this with a measure in a card or table?

 

Thanks,

Andrea

 

  • I got it:

     

    (CALCULATE ( COUNT ( Table[Element] ), ALLSELECTED(Table[Element]), MIN(Table[Date])= EE_FINDING_H[REFERENCE_DATE]
    ) - CALCULATE ( COUNT ( Table[Element] ), ALLSELECTED(Table[Element]), MAX(Table[Date])= Table[Date]
    )) / (CALCULATE ( COUNT ( Table[Element] ), ALLSELECTED(Table[Element], MIN(Table[Date])= Table[Date]
    ) ) * 100
     
    Hope it could helps others!
     
    Thanks,
    Andrea
     

3 Replies

    • arimoldi's avatar
      arimoldi
      Resolver II

      yes exactly, there are 2 stacked colums where on the X there are the months and on Y there is the count of elements 

  • I got it:

     

    (CALCULATE ( COUNT ( Table[Element] ), ALLSELECTED(Table[Element]), MIN(Table[Date])= EE_FINDING_H[REFERENCE_DATE]
    ) - CALCULATE ( COUNT ( Table[Element] ), ALLSELECTED(Table[Element]), MAX(Table[Date])= Table[Date]
    )) / (CALCULATE ( COUNT ( Table[Element] ), ALLSELECTED(Table[Element], MIN(Table[Date])= Table[Date]
    ) ) * 100
     
    Hope it could helps others!
     
    Thanks,
    Andrea