Forum Discussion

Bisco's avatar
Bisco
Frequent Visitor
8 years ago
Solved

Percentage growth

Hello Everyone!

 

I have an Issue, I'd like to make a chart which the columns are the volume (by month) and the line is the percentual growth comparing the previous period, ex:

 

 JanFevMar
Volume102030
Percentual Growth                     -  100%50%

 

Best Regards, Luiz

3 Replies

  • Bisco

     

    Was your source table just the same as the shared sample data? If so, to achieve your requirement. You can refer to following steps. If not, please share us your source table structure.

     

    1. Go to Edit Queries - > Transform menu - > Unpivot your table and go to Add Column menu - > add an new index column for it:

     

     

    2. Close & Apply, create a new calculated column to calculate the Percentual Growth. The expression is like:

     

    percentual growth =
    IF (
        LOOKUPVALUE ( Table1[Volume], Table1[Index], Table1[Index] - 1 )
            = BLANK (),
        0,
        (
            Table1[Volume]
                - LOOKUPVALUE ( Table1[Volume], Table1[Index], Table1[Index] - 1 )
        )
            / LOOKUPVALUE ( Table1[Volume], Table1[Index], Table1[Index] - 1 )
    )

     

    3. Then create the Line and stacked column chart, put Volume in Column values of chart and Percentual Growth in Line values. Result shows like this:

     

     

    Thanks,
    Xi Jin.

    • Bisco's avatar
      Bisco
      Frequent Visitor

      Hello Xi Jin, 

       

      First of all, thank you for answering me!

       

      I have a trouble there, the total of each month is a sum of a lot of rows.

       

      My data is structured like this:

       

      MonthVolume
      Jan5
      Jan2
      Jan3
      Feb1
      Feb2
      Feb4
      Feb3
      Feb10
      Mar15
      Mar15

       

      Do you have any idea to help me?

       

      Best Regards, Luiz