Forum Discussion
pradeept
5 years agoResolver I
One vs Rest
Hi Community, I have employee feedback data. Dataset: EmpID, DeptID, Rating,.. There are 8 departments. Ratings (1,2,......,10) Scenario: I want to create bar charts to compare the Average ...
- Anonymous5 years ago
Hi pradeept ,
Please follow these steps:
1. Create a table for X-axis by entering data like this:
2. Just need one measure:
Expected output = var _curr=CALCULATE(SUM('Table'[Rating]),ALLEXCEPT('Table','Table'[Department])) var _rest=CALCULATE(AVERAGE('Table'[Rating]),FILTER(ALL('Table'),'Table'[Department]<>MAX('Table'[Department]))) return IF(MAX('X-axis'[Type])="Rest",_rest,IF(MAX('Table'[Department]) =MAX('X-axis'[Type]),_curr))The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
5 years agoSuper User
pradeept , Try two measures like these
Current = average(Table[Rating])
Others = calculate(average(Table[Rating]) , filter(all(Table), table[DeptID] <> max(Table[DeptID])))