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
Colin_Davis
Frequent 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
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.