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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
Kudo Commander
Kudo Commander

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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