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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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]))))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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]))))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.