Forum Discussion
Recurring/Repeated values in columns while merging queries
Hi All,
Please I really need help with this. Dropbox link attached.
I have 5 csv files that I am trying to merge into one csv file so I can export and run predictive analysis in python. I just want to get a single csv file that has Geo Name, year, Sex, Age, Immigration status, Labour status, Employment income, Work activity status, Highest Diploma, Major field of study, Occupational classification into one csv file.
I created relationships as seen in the screenshot below. I then go to power query and use merge query . When I join the first file (Education vs immigration) to the second file (Employment income vs job type) , the values in columns that has the total number of immigrants as per each location , change and reflect a recurring value all through the whole data. I inore this and attach the third csv, all the data (employment income values ) before I merged the third data also change and become recurring. Only one value runs through the whole employment income .
I have tried aggregate instead of expanded but it ran 9hours non stop and I had to cancel it. There another software or way to merge and get the desired data into one csv? This is the link please.
https://www.dropbox.com/s/8rpk287lk2zcdqc/Predicting%20Success.pbix?dl=0
6 Replies
- mahoneypatMicrosoft Employee
This should be doable but merges can really slow things down. It is hard to troubleshoot your queries w/o the csv files to refresh against. Also, all the many:many relationships make this a real challenge. I also noticed at least one of the relationships was on two columns that don't have matching values.
Also, you shouldn't have to export your data to csv from a visual. You can just use the Python integration in Power BI.
Regards,
Pat
- AnonymousNot applicable
Thanks for reaching out. The link for my dropbox has the powerbi file .
Can you help me look at it then?
https://www.dropbox.com/s/8rpk287lk2zcdqc/Predicting%20Success.pbix?dl=0
Thanks.
- mahoneypatMicrosoft Employee
The pbix file has been deleted. Please send a link to the csv files so that I can modify the queries. Also make it clear exactly how the file need to be combined.
Regards,
Pat
- AnonymousNot applicable
Hi Anonymous,
Perhaps you can try to use Dax formula to create a calculated table to lookup and summarize different table fields and records.
Create totals table from multiple tables
Regards,Xiaoxin Sheng