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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Lookup value with condition if the existing column is blank

Hello Folks,

I need your help on creating a new column (Status) where if the Date Difference column has given below values then the new column (Status) should consist of these values:
If 8  then "1 Week"
If 175 then "6 months"
If 300 the "7 months"

If 120 then "4 months"
If 90 then "3 months"
However, if the Date Difference has blank value then lookup in the Result column where if its "Not Started" then new_status column should be "Not Started" otherwise "Date Not Found"

Have a look at the image below:

ashishoza77_1-1629889402470.png

 

Thanks in Advance!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

Create a calculated column like this :

New Status = SWITCH(TRUE(),'Table'[Date Difference]=8,"1 week",'Table'[Date Difference]=175,"6 months",'Table'[Date Difference]=300,"7 months",'Table'[Date Difference]=120,"4 months",'Table'[Date Difference]=90,"3 months",'Table'[Date Difference]=BLANK() && 'Table'[Result]="Not Started","Not Started","Date Not Found")

The result is as shown :

Ailsamsft_0-1630031355592.png

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

Create a calculated column like this :

New Status = SWITCH(TRUE(),'Table'[Date Difference]=8,"1 week",'Table'[Date Difference]=175,"6 months",'Table'[Date Difference]=300,"7 months",'Table'[Date Difference]=120,"4 months",'Table'[Date Difference]=90,"3 months",'Table'[Date Difference]=BLANK() && 'Table'[Result]="Not Started","Not Started","Date Not Found")

The result is as shown :

Ailsamsft_0-1630031355592.png

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , A new column like this

 

Switch( True(),
[result] = "Not Started" , "Not Started"

[result] <>  "Not Started", isblank([Date Difference]) , "Date not Found"
[Date Difference] < 8, "1 Week",
[Date Difference] < 175 , "6 months",
// Add others

, "Other"
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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