Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Add Group By Column

Producerregionrunmaterialcosttotaltotal group
abcmarsfasta5515
abcmarsfastb101015
abcmarsslowc151535
abcmarsslowd202035
xyzneptunefaste5530
xyzneptunefastf101030
xyzneptunefastg151530

Hi guys I looking for DAX that will add a new column "total group" to table as shown above. the last column

The column should group the values by producer, region and run and it should NOT groupby the material column.


 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    Column = CALCULATE(SUM('Table'[total]),ALLEXCEPT('Table','Table'[Producer],'Table'[region],'Table'[run]))

     

    Best Regards,

    Jay

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Column = CALCULATE(SUM('Table'[total]),ALLEXCEPT('Table','Table'[Producer],'Table'[region],'Table'[run]))

     

    Best Regards,

    Jay

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    Please refer to this documentation and see if it solves your issue. 
    In regards to creating the additional column, do you want to concatenate the values or have a numeric column?
    Concatenate: Column D = [Producer]  & [region]  & [run]