Forum Discussion

AnandRanga's avatar
AnandRanga
Helper III
9 years ago
Solved

Group by in DAX ?

I have written a formula in powerbi that is total hours/Billable hours. There can be more than 2 billable hours but there can't be more than one total hour. Total hour will be same for one date. But ...
  • ankitpatira's avatar
    ankitpatira
    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]) )