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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
learner03
Post Partisan
Post Partisan

Problem with Lookup

I want to get TradeItemQuantity and Item CBM from another table called" item-Trade Units.

akapoor03_0-1627871388988.png

 

For that I wrote this below -

TradeItemQuanity =
CALCULATE (
FIRSTNONBLANK ( 'Items - Trade Units'[TradeItemQuantity], 1 ),
FILTER ( ALL ( 'Items - Trade Units' ), 'Items - Trade Units'[ItemCode] = 'ULDs - Lines'[ItemCode] )
)
This is getting the value but the empty one,  in another table for the same item code I have 2 values like this-
akapoor03_1-1627871486827.png

the relationship is by  "ItemCode".

 

I want to write DAX where it take tradeItemQuantity where item CBM is populated and not blank line.

Here in this case it it taking Item cbm as 0.03 but taking trade item quantity as 1 , but  i want it to take it as 100.

 
1 ACCEPTED SOLUTION

@parry2k 

I have sorted that out, I jst used MAX instead of FirstNonBlank.

 

Will remember to add sample dataset next time.

 

Thanks

View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@learner03 you should share sample data, how tables are related and what is the expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

I have sorted that out, I jst used MAX instead of FirstNonBlank.

 

Will remember to add sample dataset next time.

 

Thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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