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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.