Forum Discussion
Anonymous
6 years agoNot applicable
Need solution for SQL server self join with aggregation in power bi DAX
i am considering EMP table as a scenario, it is like a self join I want to show employee and manager bars in a single bar chat , eg; I want my salary and sum of all the employees who are repo...
Greg_Deckler
6 years agoCommunity Champion
The first one should be trivial. The second one should be something like:
Manager =
VAR __emp_id = MAX(__emp_id)
VAR __table = FILTER(ALL('Table'),[manager_id] = __emp_id)
RETURN
SUMX(__table, [salary])
Your mileage may vary.