Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to create a delta calculation table from columns in another table

Hi everyone,

I have a table which structure looks like this:

 

Columns (A to Z....).  Each day, a new column is automatically created from data in the cloud.

 

How can I calculate in a different table, the deltas between the columns in the table? e.g., (B-A), (C-B)... considering that each day a new column is  created in the original table?

 

Thank you,

 
  • Hi Anonymous ,

     

     

    can you unpivot those columns in Power Query?

    The goal is to have:

     

    RowColumnValue
    1A0
    2A0
    1C4

     

    If you can have a table like this, then it's possible to calculate automatically the delta between A and B, B and C, etc

     

    Does this help you?

     

    LC

    Interested in Power BI and DAX tutorials? Check out my blog at www.finance-bi.com

5 Replies

  • Hi Anonymous ,

     

     

    can you unpivot those columns in Power Query?

    The goal is to have:

     

    RowColumnValue
    1A0
    2A0
    1C4

     

    If you can have a table like this, then it's possible to calculate automatically the delta between A and B, B and C, etc

     

    Does this help you?

     

    LC

    Interested in Power BI and DAX tutorials? Check out my blog at www.finance-bi.com

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi lc_finance . Sorry for the late reply!

       

      I was able to transpose the matrix. Adding some other variables, now it looks like this:

       

       

      The idea is to calculate the deltas in each of the columns, for each one of the rows. Data will be added as a row from the cloud everyday.

       

      For example:

                                                         1/1/2019                1/2/2019 ......            12/31/2019

      11/26/2019 - 11/25/2019     

      11/25/2019 - 11/24/2019

      .

      .

      .

      Do you know how can I do that in a new matrix? I would use the deltas for other calculations.

       

      Thank you,

      • lc_finance's avatar
        lc_finance
        Icon for Solution Sage rankSolution Sage

        Hi Anonymous ,

         

         

        Instead of transposing, can you try to unpivot it?

         

        The goal is to have 3 columns

         

        Row .                   Column               Value

         

        If easier, can you share a sample Power BI file with your data and an example of what you want to obtain?

         

        LC