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
sy898661
Helper V
Helper V

DAX help writing a calculated column

Hi!

 

I am trying to write a calc'd column and I feel like it should be simple but maybe im over-complicating it in my head.

 

I have 3 columns:

  • Parent Lot #
  • Lot #
  • Sheet Lot #

 

And I want to basically just combine these columns because there are a lot of blanks with the way this query is set up.

 

I want to say:

Use Parent Lot #

If Parent Lot # is blank, use Lot #

If Lot # is blank, use Sheet Lot #

 

I tried doing this: but if lot # is blank it just uses the blank and ignores the last line.

Lot Number # = 
    IF(ISBLANK('Query'[Parent Lot #]), 'Query'[Lot #],
    IF(ISBLANK('Query'[Lot #]), 'Query'[Sheet Lot #], 'Query'[Parent Lot #])

How would I go about writing this?

 

Thanks a bunch!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try like this

if(isblank(Parent Lot #),if(isblank(Lot #),Sheet Lot #,Lot #),Parent Lot #)

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Try like this

if(isblank(Parent Lot #),if(isblank(Lot #),Sheet Lot #,Lot #),Parent Lot #)

 

Yes!! Thank you so much I think that worked!

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.