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
trev1972a
Advocate I
Advocate I

Error with merged table data, but can see the data in the row.

Hi All, apologies for posting twice in one day- ive been puzzled by this for hours however

 

I have two tables salesorderitems and worksorders. And have merged those two tables since i wanted to do a conditional column based on values from both tables

 

The column is pretty simple - when salesorderitems.sostatus = 'ACTIVE' and worksorders.wostatus = 'ACTIVE, return a value of ACTIVE, otherwise return a value of COMPLETE (see below)

conditional column.jpg

 

When i refresh the queries about 80% of the rows show the correct value but some say 'error' with the error being that salesorderitems.sostatus isnt found for that record (below)

 

error.jpg

 

However when i look at the actual record, - i can see that salesorderitems.sostatus has a valid value for the row!

 

(below)

 

sostatus.jpg

 

How is this possible? Is it possibly related to me renaming columns? or perhaps a date filter? i am totally confused about the error when i can see the record data.

 

Thanks.

 

4 REPLIES 4
BA_Pete
Super User
Super User

Hi @trev1972a ,

 

Have you tried expanding the columns that you need from the merged table first before you add the calculated column?

There appears to be an error on the row that you are referring to in the salesorderitems table. I don't know, but this may be causing a read issue when the table hasn't been expanded.

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi Pete

 

Ive expanded the columns i need, and as i wasnt sure if i had done it first i refreshed each query seperately

 

Ive just had a closer look at the data - and it appears the error actually occurs whenever worksorders.wostatus = 'ACTIVE'

 

Which suggests there is something wrong with my logic on the conditional column but i cant for the life of me see what

 

Ill try removing and re-adding the conditional column and sorry for so many posts all

 

I don't think the column logic is wrong, the error is throwing when Power Query is assessing the logic.

Might be interesting to swap your tables around in your IF statement e.g. IF(A and B) then... goes to IF(B and A). This might make the condition get assessed in a different order and may give you different results. Unlikely to fix it, but getting different results should help to triangulate the issue.

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi Pete

 

Actually switching the logic around worked- but i have no idea why. Of course now that conditional column isnt working for charting! despite looking good in tabular data

 

But rather than post daily and drive everyone mad- ill play with it for a week or so, i think this is going to take longer to pick up than i expected.

 

Thanks again 

 

 

 

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.