Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to control output column names when using DAX GROUPBY and aggregated columns

When you use GROUPBY in isolation, the output column names are simply the same as the column names you specified.

eg Newtab = GROUPBY(table, table[colA], table[colB]) yields a table with columns call colA and col B

 

But when you add an aggregate column: Newtab = GROUPBY(table, table[colA], table[colB]),"agg_col", 

MAXX(CURRENTGROUP(), table[colC] )) the output column names become:  table_colA, table_colB, agg_col
This makes the output column names more unwieldy. Can I control the output column names?
 
NB First time using this functionality

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Yes SUMMARISE works well for me thank you. I don't anything else GROUPBY gives.

       

      Just as a supplemental (and I am happy to create a new thread): I can't specify MODE as an aggregate function. It would help me a lot if I could. Or is there a way of building a user-defined MODE function that I can use in SUMMARIZE?