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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
pbrainard
Helper III
Helper III

Replace value in one field based on null field in another

So I think what I'm wanting to do is straight forward,  but it's late and I'm suffering brain fog.

 

Want to create a measure (new column) that changes the varSENT value 'SENT' to 'SIGNED' if a date exists in the Signed On Column, and changes the varSENT value 'SENT' to 'UNSIGNED'  if the Signed On value is null. I don't want the blank values in varSENT changed.

 

pbrainard_0-1635572180722.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @pbrainard ,

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Signatures'[Signed ON]) <> BLANK(),
    IF( [varSent] <>BLANK(),"SIGNED",[varSent]),"UNSIGNED"
)

2. Result:

vyangliumsft_0-1635826796452.png

 

Best Regards,

Liu Yang

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

6 REPLIES 6
Anonymous
Not applicable

Hi  @pbrainard ,

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Signatures'[Signed ON]) <> BLANK(),
    IF( [varSent] <>BLANK(),"SIGNED",[varSent]),"UNSIGNED"
)

2. Result:

vyangliumsft_0-1635826796452.png

 

Best Regards,

Liu Yang

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

TomMartens
Super User
Super User

Hey @pbrainard,
try this measure:

Measure = 
if( hasonevalue( 'yourtablename'[Signed On] )
, if( isblank( 'yourtablename'[Signed On] )
    , "unsigned"
    , "signed"
  )
, blank()
)

 

Hopefully, this provides what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks Tom,

Getting an error: A single value for column 'Signed On' in table 'Signatures' cannot be determined....

 

This is how varSENT is built:

varSENT =
VAR SENT = SELECTEDVALUE('Signatures'[Status])
RETURN IF(SENT = "SENT", SENT, "")

Hey @pbrainard ,

 

use this one:

 

Measure = 
if( hasonevalue( 'yourtablename'[Signed On] )
, if( isblank( calculate( max( 'yourtablename'[Signed On] ) ) )
    , "unsigned"
    , "signed"
  )
, blank()
)

 

If you are wondering why I'm using MAX around the column reference, it's because there is no ROW context for this reason a column reference has to be wrapped inside an aggregation function like MAX.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Now everything in the Measure column has a value of 'signed'

Hey @pbrainard ,

 

I added a CALCULATE. This is necessary use the current filter context.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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