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
MSW
Helper I
Helper I

Skipping blanks in valuelookup

Hello, 

 

Is it possible to use valuelookup and skip zeros/blanks in order to return only the whole number associated to an ID. I have a column that only some of the unique IDs have a value per row. The dataset has many duplicated IDs which is why I'm getting the 'multiple values were supplied where a single value was expected'. Is it possible to use NoBlankrows or another type filter with valuelookup to bypass the blanks in the column? 

Thank you for the help and clarification. 

1 ACCEPTED SOLUTION

@MSW You could use CONCATENATEX instead of MAXXX to pull back multiple values. I'm having some issues trying to visualize your setup. You might try adding an index maybe? I'm not understanding what ties the second 123 in the first table to the second 123 in the second table. You'd have to have everything in the same order and use an index.  


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@MSW Assuming you are talking about LOOKUPVALUE function, use MAXX(FILTER(...),...) instead. More reliable and allows you to explicitly control the filtering.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thanks that works except that if I do not want the max value and I want the value associated to each row by ID. 

 

IE: 

 

Table 1: 

Customer ID

123
345
123
567

 Table 2:

Customer ID

Merged

123123 789
345345 134
123123 876
567567 214

 

I want to return the merged values to table one but the only way I have to connect the two is by customerID. Is it possible to look up the value and return it based on the row? The other option I have that does not appear to be working is in another table I have the merged column that is already associated to each customer ID.  Greatly appreciate the help

@MSW You could use CONCATENATEX instead of MAXXX to pull back multiple values. I'm having some issues trying to visualize your setup. You might try adding an index maybe? I'm not understanding what ties the second 123 in the first table to the second 123 in the second table. You'd have to have everything in the same order and use an index.  


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors