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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

LookupValue issue

Hello,

Im quite new in PowerBI and actually would like to kindly ask you for support.

I had an formula which works for few weeks, and now stopped working> 

NazovOrg = if(isblank(UctDenikHelios[CisloOrg]),UctDenikHelios[Spolocnost],lookupvalue(Organizace_Helios[Nazev],Organizace_Helios[SpolocnostID],UctDenikHelios[SpolocnostId],Organizace_Helios[CisloOrg],UctDenikHelios[CisloOrg]))
JozefPetrovic_1-1645437177045.png

 

 
Yesterday it started  to generate an error message> A table of multiple values was supplied where a single value was expected.
 
 
I have checked and corrected formats of inputs but it doesnt help. Based on some advice which I found on this community I have created new one formula:
 
NazovOrg2 = if(isblank(UctDenikHelios[CisloOrg]),UctDenikHelios[Spolocnost],calculate(firstnonblank(Organizace_Helios[Nazev],"n.a."),filter(all(Organizace_Helios),value(Organizace_Helios[SpolocnostID])=value(UctDenikHelios[SpolocnostId])&value(Organizace_Helios[CisloOrg])=value(UctDenikHelios[CisloOrg]))))
This generates diferent one error message> DAX comparison operations do not support comparing values of type Number with values of type Text. Consider using the VALUE or FORMAT function to convert... As I told formats are checked, and even converted in formula to value, so Im lost.
JozefPetrovic_0-1645437282678.png

 

I will be very thankfull for advice what should be checked/changed. Thank you. 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , try like

 

if(isblank(UctDenikHelios[CisloOrg]),UctDenikHelios[Spolocnost],calculate(firstnonblank(Organizace_Helios[Nazev],"n.a."),filter(all(Organizace_Helios),value(Organizace_Helios[SpolocnostID])=max(UctDenikHelios[SpolocnostId])&& (Organizace_Helios[CisloOrg])=max(UctDenikHelios[CisloOrg]))))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you, amitchandak, it works. Im going to study more what exactly caused the issue, but you hacked it.👍😊

amitchandak
Super User
Super User

@Anonymous , try like

 

if(isblank(UctDenikHelios[CisloOrg]),UctDenikHelios[Spolocnost],calculate(firstnonblank(Organizace_Helios[Nazev],"n.a."),filter(all(Organizace_Helios),value(Organizace_Helios[SpolocnostID])=max(UctDenikHelios[SpolocnostId])&& (Organizace_Helios[CisloOrg])=max(UctDenikHelios[CisloOrg]))))

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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