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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
LyonsBI_BRL
Helper III
Helper III

Lookup Value and Return Value if no value Present

I have an issue with a table where I need to assign a value to a row IF no data is present from the LOOKUP table. 

 

I have a calculated column for SCORE

 

Score = LOOKUPVALUE(statuses[score],statuses[RegistrantId],[RegistrantID])

I've tried writing a piece of code here to see if that would work but am running into a road block. 

Exists = IF('All Applicants - '[Score] in ALL('All Applicants - 1'[Score]),[Score],"No Score")

Any suggestions would be greatly appreaciated. 

 

Thanks!

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @LyonsBI_BRL 

According to your description, I can roughly understand your requirement, I think that you can simply change the original DAX formula like this:

Score =

var _value=LOOKUPVALUE(statuses[score],statuses[RegistrantId],[RegistrantID])

return

IF(_value<>BLANK(),FORMAT(_value,""),"No score")

 

And you can get what you want, like this:

vrobertqmsft_0-1624348910176.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, @LyonsBI_BRL 

According to your description, I can roughly understand your requirement, I think that you can simply change the original DAX formula like this:

Score =

var _value=LOOKUPVALUE(statuses[score],statuses[RegistrantId],[RegistrantID])

return

IF(_value<>BLANK(),FORMAT(_value,""),"No score")

 

And you can get what you want, like this:

vrobertqmsft_0-1624348910176.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

LyonsBI_BRL
Helper III
Helper III

@Anonymous 

Awesome idea! Just tried it though I'm getting this below

LyonsBI_BRL_0-1624204261950.png

 

Anonymous
Not applicable

Can you add a model relationship? If so you can just go COALESCE(RELATED('lookuptable' [column]), "my alternative value") 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.