Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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:

 

RegionUsernameLogins
EuropeTom25
EuropeTom25
EuropePhil34
EuropePhil34
EuropeMark23
EuropeMark25
EuropeMark15
USChris13
USChris13
USManny30
USManny30

 

  • 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-msft's avatar
    v-yulgu-msft
    Microsoft 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