Forum Discussion
Group by in DAX ?
- 9 years ago
AnandRanga You can achieve Group By using DAX as below. Under Modelling tab click New Table and use below code to get output in the form of second table of your screenshot.
Table = GROUPBY(TABLENAME,TABLENAME[date],TABLENAME[workinghours],"a",SUMX(CURRENTGROUP(), TABLENAME[hours]) )
AnandRanga You can achieve Group By using DAX as below. Under Modelling tab click New Table and use below code to get output in the form of second table of your screenshot.
Table = GROUPBY(TABLENAME,TABLENAME[date],TABLENAME[workinghours],"a",SUMX(CURRENTGROUP(), TABLENAME[hours]) )
Hi,
Can we use two different tables in group by function? My columns are in different tables which I want to use in group by.
If that is not possible, then what could be the alternate way to group by which allows taking two tables?
Thanks,
Janki