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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculating Max values for each group

Hello,

 

I have a data set similar to the table below that contains the first two columns "ProductName" and "ProductVersion". Currently the third column "LatestVersion" is blank.

How can I calculate the values on the third column so that it I can flag the Max values for each different "ProductName"?

 

Thanks in advance

 

ProductNameProductVersionLatestVersion
Alpha1.22.5No
Alpha2.0.1No
Alpha2.0.15Yes
Bravo21.1.0No
Bravo22.0.3No
Bravo22.1.3No
Bravo22.1.14Yes
Charlie5.13.3Yes
Charlie4.13.3No
Charlie3.13.3No
2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@Anonymous 

Using this as a calculated column in your table:

Latest Ver = 
IF(
    CALCULATE(
        MAX(Table02[ProductVersion]),
        ALLEXCEPT( Table02 , Table02[ProductName] )
    ) = Table02[ProductVersion],
    "Yes",
    "No"
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

Anonymous
Not applicable

Hi @Anonymous ,

You can create two calculated columns as below to get it, please find the details in the attachment.

PVersion = VALUE ( SUBSTITUTE ( [ProductVersion], ".", "" ) )
LatestVersion =
IF (
    [PVersion]
        = CALCULATE (
            MAX ( [PVersion] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[ProductName] = EARLIER ( 'Table'[ProductName] )
            )
        ),
    "Yes",
    "No"
)

vyiruanmsft_0-1703814330419.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

You can create two calculated columns as below to get it, please find the details in the attachment.

PVersion = VALUE ( SUBSTITUTE ( [ProductVersion], ".", "" ) )
LatestVersion =
IF (
    [PVersion]
        = CALCULATE (
            MAX ( [PVersion] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[ProductName] = EARLIER ( 'Table'[ProductName] )
            )
        ),
    "Yes",
    "No"
)

vyiruanmsft_0-1703814330419.png

Best Regards

Fowmy
Super User
Super User

@Anonymous 

Using this as a calculated column in your table:

Latest Ver = 
IF(
    CALCULATE(
        MAX(Table02[ProductVersion]),
        ALLEXCEPT( Table02 , Table02[ProductName] )
    ) = Table02[ProductVersion],
    "Yes",
    "No"
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.