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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Gandhary80
Frequent Visitor

how to add into new column value YES or NO according to version of file visible in another columns

I need to get a YES or NO value in column "E", according to the following rule:
The document number is in column B.
The document has X lines and is created in the system sequentially.
The procedure is that according to column D I have to find the document with the highest version number
And then it can also happen that the one with the highest number in column D has more variants, subversions, which are listed in column C.

Thus, for example, the rows with document name SZ-23-00363 will have YES if they have the value 4 in column D and 4 in column C, while the rows with document name SZ-23-00364 will be valid if they have the value 2 in D and also 2 in column C.

Gandhary80_0-1721133141324.png

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Gandhary80 - you can create a calculated column in Power BI using DAX. This column will check for the highest version number in column "D" and the highest subversion number in column "C" for each document in column "B" and then mark the rows 

 

for highest version , you can create measure as below:

Max Version =
CALCULATE(
MAX(Table[D]),
ALLEXCEPT(Table, Table[B])
)

 

another measure for subversion :

 

Max Subversion =
CALCULATE(
MAX(Table[C]),
ALLEXCEPT(Table, Table[B], Table[D])
)

 

Now you can add calculated column with Yes or No add it to the table chart. 

 

Valid Document =
IF(
Table[D] = [Max Version] && Table[C] = [Max Subversion],
"YES",
"NO"
)

 

Hope it works

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @Gandhary80 - you can create a calculated column in Power BI using DAX. This column will check for the highest version number in column "D" and the highest subversion number in column "C" for each document in column "B" and then mark the rows 

 

for highest version , you can create measure as below:

Max Version =
CALCULATE(
MAX(Table[D]),
ALLEXCEPT(Table, Table[B])
)

 

another measure for subversion :

 

Max Subversion =
CALCULATE(
MAX(Table[C]),
ALLEXCEPT(Table, Table[B], Table[D])
)

 

Now you can add calculated column with Yes or No add it to the table chart. 

 

Valid Document =
IF(
Table[D] = [Max Version] && Table[C] = [Max Subversion],
"YES",
"NO"
)

 

Hope it works

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors