Forum Discussion

leandroduarte's avatar
2 years ago
Solved

Total per group

Dear Colleagues, I'm trying to make a total per group using this table structure, please let me know the best way to handle it   basically I want to display for each row the total of the group and ...
  • PhilipTreacy's avatar
    2 years ago

    Hi leandroduarte 

     

    Download example PBIX file

     

    Use this measure

     

     

    Measure = CALCULATE(SUM('DataTable'[Qty]), FILTER(ALL('DataTable'), 'DataTable'[Group] = SELECTEDVALUE('DataTable'[Group]) && 'DataTable'[Year] = SELECTEDVALUE('DataTable'[Year])))

     

     

     

    Regards

     

    Phil