Forum Discussion

Raghda_Alshehhi's avatar
Raghda_Alshehhi
Frequent Visitor
4 years ago
Solved

Show % change for total yoy

I have a table which shows only totals per year, and i needto show the percentage change/growth on the same graph

What is the measure for that and which is the approriate graph type? e.g. year vs sales for each year

e.g. Table "total"

yearTotal
198610000
198723666
198845876

 

Also, i have a table that lists only entries for employees (acheivments) (Only i can ghow can i calculate day/month/year % change for this, with card showing the values in red - / or green + (depends if the value is less or more that the previos selected day/month/year

DateAchievments
12-01-2021New project
13-01-2021Employee of the month
14-01-2021Cost reduction initiative 

The idea is to monitor the changes/% for staff

all the queries here answers the changes for sum, but i din't find any solution for the total count

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Raghda_Alshehhi ,

     

    You can calculate the total for the previous year as

    previous total = CALCULATE(SUM('Table'[Total]),FILTER(ALLSELECTED('Table'),[year]=MAX('Table'[year])-1))+0

     

    The percent change is then calculated as follows.

    percentage = DIVIDE(SUM('Table'[Total])-[previous total],[previous total])+0

    You can try the stacked column chart to dispaly.

     

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Raghda_Alshehhi ,

     

    You can calculate the total for the previous year as

    previous total = CALCULATE(SUM('Table'[Total]),FILTER(ALLSELECTED('Table'),[year]=MAX('Table'[year])-1))+0

     

    The percent change is then calculated as follows.

    percentage = DIVIDE(SUM('Table'[Total])-[previous total],[previous total])+0

    You can try the stacked column chart to dispaly.

     

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

    • Mruprai's avatar
      Mruprai
      New Member

      This is excellent. This works except I have another column called version. How do I add version = version to this. Basically I have multiple years as additional row so want it where field  version is the same (aswell as the year is minus one as per example which works)