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
GallopPBI
Frequent Visitor

Replace (Blank) with 'Value' - Calculated Column

Hi Team,
 
I have a calculated column in my table view as below :
 
Sample= Table[A] & " " & LOOKUPVALUE('Table1'[B],'Table1'[C],Table[A],Blank())
 
which returns the below 

GallopPBI_2-1713870975221.png

 


Please advise since I tried using ISBLANK but nothing seems to work

 
1 ACCEPTED SOLUTION

Hi @v-jialongy-msft  Thanks. Tried same for some reason my side it does not work. Also please note that my actual calculation is a Sample= Table[A] & " " & LOOKUPVALUE('Table1'[B],'Table1'[C],Table[A],Blank()) 

 

GallopPBI_0-1714035466396.png

 

View solution in original post

17 REPLIES 17
v-jialongy-msft
Community Support
Community Support

Hi @GallopPBI 

 

Can you provide detailed sample pbix file and the results you expect.So that I can help you better. Please remove any sensitive data in advance.

 

 

 

 

Best Regards,

Jayleny

 

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

 

 

 

@V-V @Alex25 Please refer to the attached!

 

Can the category for both these entries be changes to "New Test"?

 

Dokumente

 

GallopPBI_0-1713959986114.png

Thanks

Hi @GallopPBI 

 

Can you elaborate on the circumstances under which the value of the “Category New” column changes to “New Test”?

 

 

 

Best Regards,

Jayleny

@v-jialongy-msft  When there is no value or maybe we can say if the value "1005" or "1006" is noticed then I would like to call it "New Test". Thanks

Hi @GallopPBI 

 

Please try the following Dax:

Measure = IF(SELECTEDVALUE('Actuals'[Category])=BLANK(),"New Test",MAX('Actuals'[Category]))

vjialongymsft_0-1714031968761.png

 

 

 

 

 

Best Regards,

Jayleny

 

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

@v-jialongy-msft Thanks...can you please tell me if this can be shown as a column as my data needs this to be shown as  a dimension instead of a measure.

Hi @GallopPBI 

 

Try the following DAX:

Column = IF([Category]=BLANK(),"NA",[Category])

 

 

 

Best Regards,

Jayleny

 

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

@v-jialongy-msft  When I try this I again get back to the original issue where only blank is shown and no value is updated. Please advise!

Hi @GallopPBI 

 

I did the corresponding operation in the PBIX file you provided, please refer to the DAX in it.

vjialongymsft_0-1714037562373.png

 

 

 

Best Regards,

Jayleny

 

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

@v-jialongy-msft Thanks works perfectly fine in the sample file but not in the real scenario..could you please advise why? I see only blanks again unforunately. Would the below be reason?

 

This is actually the calculated field calculation for Category

LOOKUPVALUE(Table[A] & " " & LOOKUPVALUE('Table1'[B],'Table1'[C],Table[A],Blank()))

@v-jialongy-msft Thank you I see it is close but please refer to the below. The first 3 rows under measure column should show up as "BC"

 

GallopPBI_0-1714034396816.png

 

Hi @GallopPBI 

 

Consider using the following measure:

 

Measure = IF(SELECTEDVALUE('Actuals'[Category])=BLANK(),"NA",MAX('Actuals'[Category]))

 

 

 

 

Best Regards,

Jayleny

 

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

Hi @v-jialongy-msft  Thanks. Tried same for some reason my side it does not work. Also please note that my actual calculation is a Sample= Table[A] & " " & LOOKUPVALUE('Table1'[B],'Table1'[C],Table[A],Blank()) 

 

GallopPBI_0-1714035466396.png

 

Hi @GallopPBI 

 

You're using a calculated column, please use measure to do the calculation.

 

 

Best Regards,

Jayleny

 

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

Alex25
Advocate I
Advocate I

Try IF( ISBANK( ......) = True, "Value you want when blank", "value you want when not blank i.e. your function")

@Alex25 Thanks but no change. For some reason the blank values remain

I think the issue is within the lookup, but I'm not experienced enough to resolve it without seeing more data. Hopefully someone will come along and give you more guidance

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.