Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 Name | Course Title | Status | Version | Highest Version |
Fred Smith | Excel for Beginners | In Progress | 6.0 | |
Fred Smith | Excel for Beginners | Completed | 5.0 | True |
Fred Smith | Excel for Beginners | Completed | 4.0 | |
Fred Smith | Advanced Excel | Completed | 3.0 | True |
Fred Smith | Advanced Excel | Completed | 2.0 | |
Fred Smith | Advanced Excel | Completed | 2.0 | |
Jane Doe | Excel for Beginners | Completed | 5.0 | True |
Jane Doe | Excel for Beginners | Completed | 4.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
Solved! Go to Solution.
@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()
)
Proud to be a 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()
)
Proud to be a Super User! |
|
Thank you, it returns True/False, I don't know why "Blank()" isn't returned, but I can use it.
Thank you very much.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
8 | |
7 |