cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sy898661 Member
Member

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

Accepted Solutions
Highlighted
amitchandak Super Contributor
Super Contributor

Re: DAX help writing a calculated column

Try like this

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

 

View solution in original post

2 REPLIES 2
Highlighted
amitchandak Super Contributor
Super Contributor

Re: DAX help writing a calculated column

Try like this

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

 

View solution in original post

sy898661 Member
Member

Re: DAX help writing a calculated column

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

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 299 members 2,619 guests
Please welcome our newest community members: