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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.