Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 219708

I can't append queries because of duplicated values - how to solve?

$
0
0

Hello everybody.

 

I'm stucked with this problem and I don't know if PowerBI can handle it or I have to do something different out of PowerBI.

 

Situation:

I have multiple different Queries in Dynamics NAV 2016 and I take this data through ODATA option in PowerBI.

These queries are from four different companies that are in one database. So, each company has its own Sales table, Item Ledger Entry table, etc.

 

 

What I want to get

I want to append data from each Item Ledger Entry table into one table so like this when I analyze data I can filter by company by using a filter "Company" in the dashboard.

 

Problem

When I append all four tables, I get an error saying that duplicated values were found in Entry No. column (primary key from Item Ledger Entry table in Navision).

 

PowerBI is right. Each company has this table with different values and it's normal that "Entry No." can coincide among companies.

 

How I've thought to solve it but it doesn't work

 

So I thought, well, if "Entry No." can coincide, I create a custom column concatening "Entry No." + COMPANY.

 

Solved!

 

No...

 

When I append queries, it keeps appearing the error message because it keeps taking "Entry No." as primary key and not my custom column as primary key!!

 

My assumption

 

I guess that PowerBI takes "Entry No." as primary key because in Navision it's the primary key in Item Ledger Entry table, so, here is the problem. How can I do, so that when I append queries my custom column is taken (as "primary key") instead of default primary key (Entry No.)?

 

 

 

 

If you have any doubt don't hessitate to ask. Help gurus!

 

Thank you!


Viewing all articles
Browse latest Browse all 219708

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>