Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How Group by function works in DAX?

Hi Folks,

My requirement is I want to display the total sales happed in Bangalore and Chennai in new column. Instead of showing all the location 

e.g 

Location      Sales

Bangalore  1000

Chennai       200

Noida          400

Pune            100

 

  • Anonymous , Ideally you should use a measure

     

    calculate(sum(Table[Sales]), filter(Table, Table[Location] in {"Bangalore","Chennai"} ))

     

    or new column

     

    calculate(sum(Table[Sales]), filter(Table, Table[Location] in {"Bangalore","Chennai"} ))

1 Reply

  • Anonymous , Ideally you should use a measure

     

    calculate(sum(Table[Sales]), filter(Table, Table[Location] in {"Bangalore","Chennai"} ))

     

    or new column

     

    calculate(sum(Table[Sales]), filter(Table, Table[Location] in {"Bangalore","Chennai"} ))