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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ajaydavidluke
Helper I
Helper I

Fill Blank Fields with another field - DAX

Hi Community,

 

I am revisiting a problem DAX that is missing something slight!

 

I have applied the below formula but found it didnt like the Emb Estimated Delivery Date:

ajaydavidluke_0-1632228438800.png

 

 

It doesnt give me the option to select from a different table?

ajaydavidluke_1-1632228438876.png

 

So I have used SELECTEDVALUE to access the column from another table and have the below:

ajaydavidluke_2-1632228439267.png

 

However the DAX does not return a value:

ajaydavidluke_3-1632228438982.png

 

 

I'm pretty new to Power BI so my understanding is still developing 🙂

 

 

 

 

1 ACCEPTED SOLUTION
ajaydavidluke
Helper I
Helper I

Hi Andy,

 

Its me, you but in the future, I figured out the solution:

 

IF(
ISBLANK(RELATED('Next Supply Date'[Expected Delivery Date])),
RELATED('Emb Next Supply Date'[Base Product Supply Date]),
RELATED('Next Supply Date'[Expected Delivery Date])
)
 
Thank me with a kebab later 😄 

View solution in original post

6 REPLIES 6
ajaydavidluke
Helper I
Helper I

Hi Andy,

 

Its me, you but in the future, I figured out the solution:

 

IF(
ISBLANK(RELATED('Next Supply Date'[Expected Delivery Date])),
RELATED('Emb Next Supply Date'[Base Product Supply Date]),
RELATED('Next Supply Date'[Expected Delivery Date])
)
 
Thank me with a kebab later 😄 
Anonymous
Not applicable

Hahaha. Thank you for sharing future you.

VahidDM
Super User
Super User

Hi @ajaydavidluke 

 

Try to use ISBLANK rather than [Expected Delivery Date] = BLANK(), and use Related if there is a relation between those tables or use Lookupvalue.

 

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

Appreciate your Kudos✌️!!

Thank you for your reply, ISBLANK doesnt seem to work either, in order to give you more info I have included step by step my current chain of thought.........there isnt a direct relationship between the 2 tables, relationships as below:

i)  Orders > Prod/Colour = Next Supply Date > Prod/Colour

ii) Orders > Prod Base/Colour = Next Supply Base Product > Prod/Colour

 

ajaydavidluke_3-1632303076881.png

 

 

 

I would like to create a new column within the 'Next Supply Date' named 'Expected/Estimated Delivery Date'  I would like this newly created column to look at the 'Next Supply Date[Expected Delivery Date]' and if this date is blank/null/no value, to return back the date 'Next Supply Base Product'[Emb Estimated Delivery Date] else if 'Next Supply Date[Expected Delivery Date]' is not blank/null/no value to retain that value.

 

A Crystal report formula equivilant would be something like:

IF (ISNULL('Next Supply Date[Expected Delivery Date]')) THEN 'Next Supply Base Product'[Emb Estimated Delivery Date] ELSE 'Next Supply Date[Expected Delivery Date]'

 

Can anyone suggest the best course of action in this case?

 

Currently I'm using this

ajaydavidluke_4-1632303076730.png

 

Which is returning:

ajaydavidluke_5-1632303076956.png

 

 

What I should be seeing in 'Expected/Estimated Delivery Date' are dates pulled in from 'Emb Estimated Delivery Date' where 'Expected Delivery Date' has no value.

 

Many thanks in advance,
AJ 

nandukrishnavs
Super User
Super User

@ajaydavidluke 

 

If there is a proper relationship then use RELATED()

 

 

 

RELATED(<column>)

 

 

 

 

Expected/Estimated Delivery Date =
VAR prod_colour = [Prod/Colour]
RETURN
    IF (
        [Expected Delivery Date] - BLANK (),
        RELATED ( [Emb Estimated Delivery Date] ),
        [Expected Delivery Date]
    )

 


Regards,
Nandu Krishna

Thank you for your reply, there isnt a direct relationship between the 2 tables, relationships as below:

i)  Orders > Prod/Colour = Next Supply Date > Prod/Colour

ii) Orders > Prod Base/Colour = Next Supply Base Product > Prod/Colour

 

ajaydavidluke_2-1632303011094.png

 

 

I would like to create a new column within the 'Next Supply Date' named 'Expected/Estimated Delivery Date'  I would like this newly created column to look at the 'Next Supply Date[Expected Delivery Date]' and if this date is blank/null/no value, to return back the date 'Next Supply Base Product'[Emb Estimated Delivery Date] else if 'Next Supply Date[Expected Delivery Date]' is not blank/null/no value to retain that value.

 

A Crystal report formula equivilant would be something like:

IF (ISNULL('Next Supply Date[Expected Delivery Date]')) THEN 'Next Supply Base Product'[Emb Estimated Delivery Date] ELSE 'Next Supply Date[Expected Delivery Date]'

 

Can anyone suggest the best course of action in this case?

 

Currently I'm using this

ajaydavidluke_0-1632302674901.png

Which is returning:

ajaydavidluke_1-1632302725839.png

 

What I should be seeing in 'Expected/Estimated Delivery Date' are dates pulled in from 'Emb Estimated Delivery Date' where 'Expected Delivery Date' has no value.

 

Many thanks in advance,
AJ 

Helpful resources

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

Top Solution Authors