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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RachelS0815
Regular Visitor

Lookup Values on Multiple Criteria Returns Different Values Under Same Condition

Hello,

 

I am new in DAX, and I try to look up a value under multiple conditions. However, it returns the correct value in some columns but not all. But the criteria is the same. I try to circle back to the lookup file to see where this number comes from but it shows that it cannot find. I am so confused what I did wrong. I attached partial of the report and the lookup table. 

 

Many Thanks,

 

QOH VALUES = LOOKUPVALUE('QOH SUM'[Month Cost To Date],'QOH SUM'[ITEM NO_],'Inventory DIO'[ITEM_NO],'QOH SUM'[LOCATION CODE],'Inventory DIO'[Location Code],'QOH SUM'[MON_IND],'Inventory DIO'[MON_IND])

 

2022-06-03_9-56-38.jpg

 

1 ACCEPTED SOLUTION

Hi Kalyj,

 

Thanks for you reply. I finally found out the issue yesterday that Power BI sum the values when I added. Once I removed the sum, it is fixed. 

 

Regards,

 

Rachel

View solution in original post

5 REPLIES 5
CarlesMB
Regular Visitor

I guess that you need to sum all the values of the same Item_no, Location Code and Mon_Ind.
I think that you should have to try with:
Calculate(
Sumx("Table_0", "Table_0.Month cost to date"),
Filter (All ( table_0), Table_0.Item no = Table_1.Item no &&  Table_0.Mon ind = Table_1.Mon ind && Table_0.Location Code = Table_1.Location Code))

Thanks for the reply. However, in my lookup file, it is only 1 value under the same criteria, ie the value is 119768.97 when item is 270553, location is BC Surrey and Month is 2020-09-01, so I don't need to do sum but just lookup value. 

Hi @RachelS0815 ,

I create a sample and can't reproduce your problem. Is QOH VALUES a calculated column? Did the two tables have relationship, in which column did they relate. What's the difference between rows got the correct value and rows got the wrong value.

Best Regards,
Community Support Team _ kalyj

Hi Kalyj,

 

Thanks for you reply. I finally found out the issue yesterday that Power BI sum the values when I added. Once I removed the sum, it is fixed. 

 

Regards,

 

Rachel

Hi @RachelS0815 ,

Glad your problem is solved. If you don't have other problems, would you please accept your answer as the solution, then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

Best Regards,
Community Support Team _ kalyj

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.