Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX formula

Hi all,   Dates are the columns and it goes until 4/1/22.   How can I add it all and get the sum at the end. Also, the data keeps changing and the total should change accordingly. How can I do ...
  • Icey's avatar
    4 years ago

    Hi Anonymous ,

     


     


    This table is a two-dimensional table. It is common in Excel. Two-dimensional tables have these advantages:

    1. more in line with reading habits;

    2. more condensed information;

    3. suitable for displaying results.

     

    However, when performing data analysis as source data, a one-dimensional table is more suitable. 

     

    So it is suggested to keep you data like below and show your data use Matrix visual as what AlexisOlson mentioned. It can show data as a 2D table.

     

     

    Without considering other issues, consider this situation you mentioned:


     

    Dates are the columns and it goes until 4/1/22.

     

    How can I add it all and get the sum at the end.

    Also, the data keeps changing and the total should change accordingly.

     


    If you have dates as column names, when a new date generates, a new column generates in Power BI accordingly. But Power BI won't recognize the new column and an error like "can't find column "xxx"" will occur. This way your data can't be refreshed dynamically.

     

    Hope I explained it clearly.

     

     

    Best Regards,

    Icey

     

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