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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
prita
Helper I
Helper I

Add custom column based on multiple status columns

Hello,

 

I have a data table with multiple status fields, I want to create a custom column based on the values of these fields. Here is a sample of what my data looks like:

 

CandidateStage 1Stage 2Stage 3Stage 4
AAssigned SkippedAssignedAssigned
BAssigned   
CAssignedAssigned  

 

These columns are a part of a larger data table that is imported from a live SharePoint list. This list is tracking the progress of a test that has multiple stages. A candidate progresses to Stage 2 only if they have cleared stage 1 OR have skipped stage 1 and have been straight away assigned to Stage 2. 

 

As soon as a candidate name is entered to the list the stage 1 column is assigned some value, so the Stage 1 column will always have some value either "assigned" or "skipped". I want to create a custom column in Power BI that will tell me which stage a candidate is at. So if Stage 4 has no value and stage 3 has no value but stage 2 is not blank then my custom column value should say "Stage 2".

 

Hope I was able to explain my requirement, let me know there are questions. TIA

 

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@prita 

 

do you want to find the latest status or stage name?

 

Column = if(ISBLANK(Sheet17[Stage 4]),if(ISBLANK('Sheet17'[Stage 3]),if(ISBLANK(Sheet17[Stage 2]),Sheet17[Stage 1],Sheet17[Stage 2]),Sheet17[Stage 3]),Sheet17[Stage 4])

Column2 = if(ISBLANK(Sheet17[Stage 4]),if(ISBLANK('Sheet17'[Stage 3]),if(ISBLANK(Sheet17[Stage 2]),"stage1","stage2"),"stage3"),"stage4")

1.PNG





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@prita 

 

do you want to find the latest status or stage name?

 

Column = if(ISBLANK(Sheet17[Stage 4]),if(ISBLANK('Sheet17'[Stage 3]),if(ISBLANK(Sheet17[Stage 2]),Sheet17[Stage 1],Sheet17[Stage 2]),Sheet17[Stage 3]),Sheet17[Stage 4])

Column2 = if(ISBLANK(Sheet17[Stage 4]),if(ISBLANK('Sheet17'[Stage 3]),if(ISBLANK(Sheet17[Stage 2]),"stage1","stage2"),"stage3"),"stage4")

1.PNG





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

Proud to be a Super User!




@ryan_mayu  Thank you so much! It worked 😊

Hi @ryan_mayu 

 

I want the stage name, thank you for this, let me apply this and get back. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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