Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am still pretty new at learning my way around Power Query and M, and hoping some of you with more experience could help prvoide some tips and ideas.
I am working to pull various accounting data via our office's 3rd party provider API. In working to do so I can pull the "Forecast", "Budget" and "Actuals", and those are with the datsSetID parameter of 1, 2 and -3, respectively.
And I figured out how to pull these under 3 separate queries. But I would much prefer to have The Forecast, Budget and Actuals as columns all in the same table, possibly all with 1 query.
As an example, the query below is getting October 2020 Actuals; dataSetId -3. I then did some filtering and renamed the "stat" and "amt" columns to "actual stat" and "actual amt"
Now I want to basically add a "budget stat" and "budget amt" and similar for the forecast numbers. I did experiement with merging and appending the queries but not have figured it out yet. I don't want to really add another X thousand rows, but rather just get the budget and forecast data into additional columns.
The one thing I think could be an issue is that a value could exist for the Actual and not exist for Budget or Forecast. Similar the other way around and exist for Budget and $0 actual.
Again, I'm still new with Power Query and M. But have some experience with VBA and coding in general. Just trying to get my head around it all.
Thanks,
PT
Solved! Go to Solution.
Hi @ptmuldoon - I am not clear on your requirements. There could be a terminology issue here.
If you could show us some data so we can visualize what you are dealing with that would help.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingGreat. If you have any specific questions, I recommend a new thread with some good data for us to work with. Hope ot goes smoothly for you!
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks. The simple thing I was not doing correctly earlier was actually grabbing all of the columns to have it compare when doing the merge. I think I have it figured out and will be working some more on it hopefully this weekend.
You need to use the Merge feature. You can google how to do it, or you can share your two tables (or relevant sample data) and I can provide an example for you. I'll repost the info on getting data to us.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @ptmuldoon - I am not clear on your requirements. There could be a terminology issue here.
If you could show us some data so we can visualize what you are dealing with that would help.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks for getting back to me and let me try and work to sanitize a sample file to share.
But yes, I am essentially attempting to add columns from one table to another.
So I have three queries that are identical and all return the exact same column names. two of those column names are "stat" and "amt". My goal is have the "stat" and "amt" for the Actuals, Budget, and Forecast queries all in the same table.
Like you mentioned, I could do it do it Excel with an Xlookup or Index/Match type formulas. But I'm hoping to be able to combine/merge them in Power Query if possible
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
54 | |
21 | |
12 | |
11 |