Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic Calculated column in matrix
Hi , How to create dynamic calulated(Total) Column in matrix by using the names. For example i have two names like ABC , DEF and in future the new name will add say GHI with values. Now i ne...
jdbuchanan71
6 years agoSuper User
Anonymous
The columns ABC, DEF, GHI are seperate columns in your data table? If so you can write a measure to add them together, you would just have to add in new columns as the appear in the table:
Total = SUM ( YourTable[ABC] ) + SUM ( YourTable[DEF] ) + SUM ( YourTable[GHI] )
rsaprano
6 years agoMost Valuable Professional
jdbuchanan71 - this measure wouldn't automatically pick up a new column (e.g JKL) which is the requirement!
- jdbuchanan716 years agoSuper User
In order for the new entries to get picked up you will have to unpivot them to a name value pair in the query editor. Select all the columns that are not one of the value columns (ABC, DEF, GHI) and choose unpivot other columns. That way when new columns come in they will get picked up by the unpivot.