Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MichaelHutchens
Helper IV
Helper IV

Summarizecolumns with a filter that returns max of grouping by email address

Hi folks,

 

I'm hoping someone can help. I have a table of user records and I need to create a SUMMARIZECOLUMNS-based table that FILTERS records where the Employee ID is the highest, grouped by each Email Address. Here's a sample of user records:

Email AddressEmail StatusEmployee NameOrg UnitEmployee ID
Jimmy.Jimson@emailaddress.co.nzActiveJimmy JimsonName 120007406
Jimmy.Jimson@emailaddress.co.nzActiveJimmy JimsonName 120011554
danny.danson@emailaddress.co.nzActiveDanny DansonName 280000079
danny.danson@emailaddress.co.nzActiveDanny DansonName 280000375
danny.danson@emailaddress.co.nzActiveDanny DansonName 280000662
Sally.Salson@emailaddress.co.nzActiveSally Salson 10005247
Sally.Salson@emailaddress.co.nzActiveSally Salson 20000738
Sally.Salson@emailaddress.co.nzActiveSally Salson 20010319
Sally.Salson@emailaddress.co.nzActiveSally SalsonName 491004059

 

And here are my expected results:

Email AddressEmail StatusEmployee NameOrg UnitEmployee ID
Jimmy.Jimson@emailaddress.co.nzActiveJimmy JimsonName 120011554
danny.danson@emailaddress.co.nzActiveDanny DansonName 280000662
Sally.Salson@emailaddress.co.nzActiveSally SalsonName 491004059


Any help would be greatly appreciated 🙂

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, 

Please check the below picture and the attached pbix file.

It is for creating a new table.

 

Untitled.png

 

New table =
CALCULATETABLE (
    Data,
    TREATAS (
        SUMMARIZECOLUMNS (
            Data[Email Address],
            "@maxemployeeID", MAX ( Data[Employee ID] )
        ),
        Data[Email Address],
        Data[Employee ID]
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, 

Please check the below picture and the attached pbix file.

It is for creating a new table.

 

Untitled.png

 

New table =
CALCULATETABLE (
    Data,
    TREATAS (
        SUMMARIZECOLUMNS (
            Data[Email Address],
            "@maxemployeeID", MAX ( Data[Employee ID] )
        ),
        Data[Email Address],
        Data[Employee ID]
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thanks so much @Jihwan_Kim , that's perfect 🙂

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.