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
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
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.