Forum Discussion
Relationship problem after appended data
Greetings~
Current situation: I had a nice relationship going between my query and 2 reference queries where I filtered for variables in the same column. This was so that I could create a calulated column in my report. Before I appended my data with date from other years, this had all worked! With the relationship between the two tables being "one to many". Now that there are more years, my relationship is spoiled! How do I fix this?
limewire for everyone else, we added unique key in both the tables by concatenating year & program name columns and relationship become 1 to many and every existing calculation worked as expected. Cheers!!!
11 Replies
- vanessafvgCommunity Champion
what error are you getting, what problem is this creating? What did the relationship do previously, can you post some data? or the relationship view and tell me what you are expecting.
- limewireHelper I
vanessafvg Thank you for replying!
The error that I am experiencing is in my calculated column. I used this formula before
Column_All = DIVIDE('1_All (2)'[All],RELATED('1_All (3)'[All]))*100
-Queries 1_All (2) & 1_All (3) are both referenced from 1_All
-I had a relationship of one to many set between 1_All (2) & 1_All (3).
-1_All_ (3) had unique values (until I added data from previous years)
-After I appended the data, I had to change the relationship between the two tables to many-to-many and now my formula won't work. It says that it can't find a related value from the 1_All(3) anymore :(
I really want the calculated column to work again! But none of them work now.
this is what 1_All(2) looks like - it has the year column in it as well.
this is what All_1(3) looks like. Previously, it had the unique values that made my calucated column formula work
how my calculated columns look now
- limewireHelper I
Also I have tried to make a "key" table that only has programs (which is a unique value i believe) from the original query and made it a list but still i could not create a one-to-many relationship and thus could not have a calculated column.
I am stumped. Again!