Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Friends,
I'm working on Power BI report and I have a table which contains list of Organisations and the roles within each of the organisation as below. I would like to count the "Total_Role" under each "ID". How can I achieve this, any help would be greatly appriciated. I'm quite new in dex.
Organistation | ID | Total_Role |
Ab | 1223 | 2 |
Ab | 1223 | 2 |
Ab | 1223 | 2 |
Bc | 1332 | 1 |
Bc | 1332 | 1 |
I'm expecting the measure should count only 1 role against each ID. So the total should be 3 not 8
Result | TotalRole |
Ab | 2 |
Bc | 1 |
Solved! Go to Solution.
@biswad add ID to measure
= SUMX( SUMMARIZE('table','table'[Organistation],'table'[ID],'table'[Total_Role]),[Total_Role])
Hi @biswad ,
The Simplest way of doing that is, use SUMMARISE function
TotalRole =
SUMX(
SUMMARIZE('Table', 'Table'[Org], 'Table'[ID]),
1
)
Hi @biswad try it
= SUMX( SUMMARIZE('table','table'[Organistation],'table'[Total_Role]),[Total_Role])
Hi, thank you for your solution. But I'm looking to get the sum of the roles based on the ID , and when I use the query you have shared over the ID column it doesn't quite give me the result I was looking at.
@biswad add ID to measure
= SUMX( SUMMARIZE('table','table'[Organistation],'table'[ID],'table'[Total_Role]),[Total_Role])
User | Count |
---|---|
53 | |
22 | |
18 | |
16 | |
11 |
User | Count |
---|---|
80 | |
57 | |
40 | |
19 | |
10 |