Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I am a bit new to PowerBI, don't know much about M for PowerQuery.
I am trying to pull in data from a DB to produce automated metrics that are currently manual. One of the requirements for these metrics is that I have to compare the data from this month to last month. The current method has two exports of the data that comprises of current month export and previous month export.
Is there a way to replicate the above of having two different exports from the DB using PowerBI? I tried looking into Incremental refreshes but that seems to just update and add versus what Im looking for which is a complete table of the previous months' data and another table for the current month. Also, this is planned to be refreshed automatically, in case that peice of information is important and I am not able to alter the DB.
Please advise and Thank you.
Hello,
I don't think that the data itself is necessary. Also, its very sensitive data, so I've sponged it a lot. This probably does not help, but you can use any data you want, to reiterate, I am looking to pull this data from a Database and have two instances of it. One instance that has data from a previous month and one that has data from the current month. So the table below would be this months data, and previous months data would be the same except Last Seen would be from 5/8/2022.
I.D. | Operating System | IP | Type | Category | Status | First Seen | Last Seen |
1 | Redhat | null | Server | Recurring | Active | 1/5/2022 | 6/8/2022 |
2 | Windows | null | Server | Recurring | Active | 1/6/2022 | 6/8/2022 |
3 | Windows | null | Server | Recurring | Active | 1/5/2022 | 6/8/2022 |
4 | Redhat | null | Server | Complete | Active | 1/6/2022 | 6/8/2022 |
5 | CentOS | null | Server | Recurring | Active | 1/6/2022 | 6/8/2022 |
6 | Redhat | null | Server | Recurring | Active | 1/5/2022 | 6/2/2022 |
7 | Windows | null | Server | Recurring | Active | 1/6/2022 | 6/8/2022 |
8 | Windows | null | Server | Recurring | Active | 1/6/2022 | 6/8/2022 |
9 | Redhat | null | Server | Recurring | Inactive | 1/5/2022 | 6/5/2022 |
10 | CentOS | null | Server | Complete | Inactive | 1/6/2022 | 6/8/2022 |
My idea was to create a separate blank query (Prev Table) that copies the Main tables data. So when it comes time to pull in the new data, I would refresh the Prev Table to pull the data that is currently in the Main table that is currently out of date, then I would refresh the main table to pull in this months new data.
Another idea was possible a history table with summarized data? So I would create a new table that captured the current month that its capturing, sum of total rows in this months, and number of active servers (This is ultimately the data I need for the metrics). And with every refresh it would add in a row or at the very least, from the previous month.
Power BI has no memory. You need to store your snapshots in your upstream system.
By Upstream System, do you mean the DB that I am pulling from?
yes, the data source.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523