Forum Discussion
Anonymous
7 years agoNot applicable
Aggregating Max value for all Users
Hello All,
I'm new to Power BI
I want to aggregate data based on Region for the users.
It should take the maximum login for a user and then aggregate it for Region.
How do I do it Power BI. I have provided a simple example of data
I'm expecting output to be:
Europe 84
US 43
Thanks
Varun
Data:
| Region | Username | Logins |
| Europe | Tom | 25 |
| Europe | Tom | 25 |
| Europe | Phil | 34 |
| Europe | Phil | 34 |
| Europe | Mark | 23 |
| Europe | Mark | 25 |
| Europe | Mark | 15 |
| US | Chris | 13 |
| US | Chris | 13 |
| US | Manny | 30 |
| US | Manny | 30 |
Hi Anonymous,
Please create such a measure:
Sum measure = VAR temp1 = SUMMARIZE ( Data, Data[Region], Data[Username], "Max logins", MAX ( Data[Logins] ) ) RETURN SUMX ( temp1, [Max logins] )Best regards,
Yuliana Gu
1 Reply
- v-yulgu-msftMicrosoft Employee
Hi Anonymous,
Please create such a measure:
Sum measure = VAR temp1 = SUMMARIZE ( Data, Data[Region], Data[Username], "Max logins", MAX ( Data[Logins] ) ) RETURN SUMX ( temp1, [Max logins] )Best regards,
Yuliana Gu