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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Colin_Davis
Regular Visitor

MAX value with Filter or If

I want to create a New Column that contains True, if this is the higest version for this user, for this course, and the status is completed.  I have the following table called Main:

 

User NameCourse TitleStatusVersionHighest Version
Fred SmithExcel for BeginnersIn Progress6.0 
Fred SmithExcel for Beginners Completed5.0True
Fred SmithExcel for Beginners Completed4.0 
Fred SmithAdvanced ExcelCompleted3.0True
Fred SmithAdvanced ExcelCompleted2.0 
Fred SmithAdvanced ExcelCompleted2.0 
Jane DoeExcel for Beginners Completed5.0True
Jane DoeExcel for Beginners Completed4.0 

 

I want to create the "Highest Version" column that will show the row that is the highest version of each course completed by each user.

 

Thank you.

Colin

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Colin_Davis , Create a new column using

 

DAX
Highest Version =
VAR CurrentUser = 'Main'[User Name]
VAR CurrentCourse = 'Main'[Course Title]
VAR CurrentVersion = 'Main'[Version]
RETURN
IF(
'Main'[Status] = "Completed" &&
CurrentVersion =
CALCULATE(
MAX('Main'[Version]),
FILTER(
'Main',
'Main'[User Name] = CurrentUser &&
'Main'[Course Title] = CurrentCourse &&
'Main'[Status] = "Completed"
)
),
TRUE,
BLANK()
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Colin_Davis , Create a new column using

 

DAX
Highest Version =
VAR CurrentUser = 'Main'[User Name]
VAR CurrentCourse = 'Main'[Course Title]
VAR CurrentVersion = 'Main'[Version]
RETURN
IF(
'Main'[Status] = "Completed" &&
CurrentVersion =
CALCULATE(
MAX('Main'[Version]),
FILTER(
'Main',
'Main'[User Name] = CurrentUser &&
'Main'[Course Title] = CurrentCourse &&
'Main'[Status] = "Completed"
)
),
TRUE,
BLANK()
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you, it returns True/False, I don't know why "Blank()" isn't returned, but I can use it.  
Thank you very much.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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