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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
nagaraj007
Post Patron
Post Patron

LOOKUPVALUE SHOULD SHOW ONLY FIRST VALUE AND OTHERS 0 OR BLANK

Hello All,

I have a requirement wherein I have used LOOKVALUE to get the numbers from different table. However i have similar data in the main table which has resulted in getting the same number everywhere.

 

I would like to get only first number (4440) and make others as 0 or blank. As i need to sum the column which will result in wrong numbers if i use just lookupvalue function.

target3.png 

2 REPLIES 2
Elipum
New Member

Try this:

MAXX (
    FILTER ( SearchTable, SearchTable[Product] = ThisTable[Product] ),
    SearchTable[Category]
)
rsaprano
Most Valuable Professional
Most Valuable Professional

Hi @nagaraj007 

 

LOOKUPVALUE should only be used when there is a single value for what is being looked up (otherwise it will return an error); to return the "first" value you need to define what makes it the first value - the first corresponding ID, or the lowest value? (if you don't have anything you can add an index column in the query editor)...then you need to use a measure to sum the corresponding  values for each item by applying filters for the first item and any other context you want to restrict it to. If you post an example dataset I can show you an example of such a measure?

 

Thanks

 

Rishi

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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