Forum Discussion

sajal161292's avatar
sajal161292
Icon for Helper V rankHelper V
8 years ago

To create a summarized column in dax

Hi,

 

I have this requirement to represent the data as this:

 

I need to aadd an additional column “Past Due” prior to the dates to sum-up the information from the past:

 

Could you please tell me a way of achieving it using dax

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI sajal161292,

     

    I'd like to suggest you use unpivot your table to convert date columns, then you can simply create a calculate column to look up previous data based on data column.

    Unpivot columns (Power Query)

     

    If you still need some help for coding dax with 'unpivoted records', you can share some sample data and expected result here with table format.

     

    Regards,

    XIaoxin Sheng

    • sajal161292's avatar
      sajal161292
      Icon for Helper V rankHelper V

      Hi,

       

      I need to add an additional column "Past due" which contains all the information from the past and summarizes it in the report.

      This column should be a static field so that whenever user selects any date range then he should be able to see all the previous data in the column "Past due".

       

      example: if user selects 11-June-2018 then the Past due column should contain all the data(POs that are still open but not yet received yet) till 10-June-2018 

      Please find my PBIX file below:

       

      https://drive.google.com/open?id=1p2w1pXsyg7XQYgzIBZRx3HmBaD9UJyUI

       

      Please help me in achieving this requirement.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi sajal161292,

         

        Current power bi not support to create dynamic column/table based on slicer/filter, please use measure to instead.

         

        BTW, after research your report, I found you only need to add a slicer with before mode, and turn on column total. Matrix visual will auto summary previous result on total column.

         

        Regards,

        Xiaoxin Sheng