Changing the query data source to new updated sheet questions - powerbi

We are utilizing an excel monthly report in our power bi project that has added measure columns, and we keep the sheets the fields pull the data from in one folder. When we get each month's updated excel sheet, would we be able delete the old one, add the new report to the folder with the exact same name as the old, and refresh the power bi query to use the new updated data? All the column headers would remain the same, the only thing that would be changing is maybe the amount of rows and the data within them. If we were to keep all the names the same, the only thing changing is the data sheet itself (not the column headers just the data) would the added measure columns remain and work? The measure columns act as column data multipliers and filters, and it would be a pain to make new ones each month.
Thanks

Yes. If the file path and filename and sheet/table name all remain the same, Power BI won't know the difference and you shouldn't have trouble if the columns and headers stay consistent.
Additionally, if you don't want to rename the file or delete/move older files from the folder, you could do a Load from Folder query and sort by date created/modified and grab the top row instead of specifying the filename.

Related

Power BI Map Values are not updating

I copied an old Power BI Report and gave it a new source. The new source has the same columns but updated data.
The Map of the USA on the NEW PBI report I made does not change the values by state, it gives it to max value, i.e. all the states say 4,100 instead of different number.
The filters all match, what else should I check?
If you "replace" a query by another one with the same name, the data model will be broken. What you need to do is "edit" an existing query and "paste in" the new code. You can do that by opening both queries in the PQ Advanced Editor. Of cause the new code has to result in the same column structure.

Power BI changing data source from CSV to folder while keeping all measures

I have a Power BI report where I load data from a CSV into a table (Original Table). I want to change the source of the table to a folder that contains multiple CSVs. The issue i'm having is that when I go to change the data source settings of my Original Table I cannot change it to folder. Original Table has many measures and I would like to avoid rewriting them all. Any ideas?
Create a new query that reads multiple csv from a folder and combines them.
Make sure the column names are the same as in your original table.
Open both queries in the advanced editor and copy the whole code from the new query to the old query
Delete the new query

What do I need to add to create a count vizualization

I have a CSV file that has a list of wineries in one column and the state they are in, in another. What would I need to add to the data in Power BI in order to create a visualization that shows how many wineries are in each state?
For example, I have a CSV file that has 2 columns. One says the name of the winery and the other column has the state it is located in. I need to create a visual in Power BI that shows how many wineries are in each state. For instance, there are 999 wineries in California, ect.
I am very new to Power BI, so I do not understand all the codes and measures. So I am trying to figure out what needs to be added in order to show a visual like this.

Power BI - Copying data to new column before refreshing data

This is what I hope to be a very simple issue, I'm just having a hard time putting the right search terms together in order to find the answer.
Basically, I want to preserve the data from the last refresh before the data is refreshed again, in order to compare the difference.
Example:
I have a basic web scrape that runs off and grabs the latest stock price for Microsoft:
What I want to be able to do during the refresh is to first copy the current value (283.85) to a new column and then refresh the data, so that I have a side by side current and previous price.
Really tried to find an answer, but I don't think I'm using the correct terminology.
I have never used this method. Would it be easier to add a date column to your current table and make it your record table? That way you can do a comparison and visuals from your data.
If you really want separate tables you could update your table with the date column and then write a table query to get your latest stock price according to date

Union Data Power BI

new to Power BI and just built a dashboard with some finance data with the following columns,
Date|Transaction ID|Transaction Amount|Item Description|Item Key
Every month I receive a new CSV file with data for the previous month. Rather than manually adding the new data to a master file each month, is there a way to simply drop the new CSV file into a folder each month and then refresh the dashboard so it automatically includes the new data (minus the headers)? If possible, I'd also like to add a column which holds the date the new file was loaded, so each new month's file is date stamped each time it's added.
Many thanks
What you can do is use a folder as a source instead of a csv.
That folder should contain all csv files.
When all your files are load you only have to select the following option:
After that you will have all the data from the all csv files in one gigant table.
Unfortunately its not possible to add a date column with the load date.
The only way to do that is that the csv files have the date column.
Hope it helps you.