Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure sum columns doesn't exist

Helllo 

My current measue is Sum(S1_101)+ Sum(S2_101)+Sum(S3_101). User will add S4_101,S5_101,S6_101 etc. How can I make my measure include new column automaticlly ?

 

Project S1_101S1_1012S2_101S2_102S3_101S3_102
A100200150300600400
B100200150300600400
C100200150300600400
  • Hi, Anonymous 

     

    I doubt this can be done with DAX. You can manually add new columns in the measure that need to be summed.

    But if you Unpivot the columns and then use the matrix to display the data, then it will be summed automatically.

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


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

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your answer, I can unpivot and split column, then caculate(sum(value),filter(table,New_code=101)). I am curious whether we can deal with by Dax

      • v-angzheng-msft's avatar
        v-angzheng-msft
        Community Support

        Hi, Anonymous 

         

        I doubt this can be done with DAX. You can manually add new columns in the measure that need to be summed.

        But if you Unpivot the columns and then use the matrix to display the data, then it will be summed automatically.

         

         

        Best Regards,
        Community Support Team _ Zeon Zheng


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