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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Nnamarie_1997
Frequent Visitor

Add column based on another column values from another table

Hi,

Good day.

Asking for your help, I am only a beginner.

I am struggling to get the Status in Table 2 that excludes Process #1,

by using New column?

 

These are my 2 sample tables:

Nnamarie_1997_2-1639020261862.png

 

And my sample Desired Output:

Nnamarie_1997_1-1639020182308.png

 

Reference for my Status Column:

On-Going if the Group still have "Not Yet Done" Remarks, ignoring Process 1.

Completed If the Group have "Ignore/Done" Remarks, ignoring Process 1.

 

Thank you in advance ‌‌:)

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Picture2.png

 

New Table1 =
ADDCOLUMNS (
VALUES ( Table1[Col 1] ),
"@status",
CALCULATE (
VAR currentcategory =
MAX ( Table1[Col 1] )
VAR withoutprocessone_withnotyetdone =
FILTER (
Table1,
Table1[Col 1] = currentcategory
&& Table1[Process] <> 1
&& Table1[Remarks] = "Not Yet Done"
)
RETURN
IF ( COUNTROWS ( withoutprocessone_withnotyetdone ) > 0, "OnGoing", "Complete" )
)
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Picture2.png

 

New Table1 =
ADDCOLUMNS (
VALUES ( Table1[Col 1] ),
"@status",
CALCULATE (
VAR currentcategory =
MAX ( Table1[Col 1] )
VAR withoutprocessone_withnotyetdone =
FILTER (
Table1,
Table1[Col 1] = currentcategory
&& Table1[Process] <> 1
&& Table1[Remarks] = "Not Yet Done"
)
RETURN
IF ( COUNTROWS ( withoutprocessone_withnotyetdone ) > 0, "OnGoing", "Complete" )
)
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank You so much Sir..

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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