Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Pranali_R
Frequent Visitor

Appending Date-wise Summary Data for Tracking Trends in Power BI

I have two datasets, each consisting of date-wise Excel files. I perform Left Anti Join and Right Anti Join operations to calculate the record counts from each dataset, comparing two files at a time.

Is there a way to append summary numbers (e.g., counts) on a date-wise basis, so that when new files are added, I can continuously track and visualize the data trends over time? I’m looking for an efficient method to maintain a growing historical record of this data, comparing the counts across different dates.

Example: I have data for January 1, 2024, and January 2, 2024. After performing the joins on these two datasets, I get the counts. I want to retain this data and append it when I receive the file for January 3, 2024. The comparison would then be between January 2 and January 3, while ensuring that the records for January 1 and January 2 remain unchanged but only new row for 3rd Jan will be added.

My table will contain data aggregated at the level of January 1, January 2, and January 3, and so on.

Does anyone have suggestions on how to automate this process in Power BI and maintain a historical trend of the data?

1 REPLY 1
FarhanJeelani
Super User
Super User

Hi @Pranali_R ,

To append date-wise summary numbers for trend analysis across datasets in Power BI, you can implement the following approach:

 

1. Set Up Historical Tracking
Create a structure to maintain historical data by appending new summaries to an existing table whenever a new file is added. This involves creating a summary table to store counts and their corresponding dates.

 

 Steps to Implement:

a. Load the Datasets
1. Import Both Datasets: Import the two datasets into Power BI. Use the folder connector if your datasets are stored in multiple files within a folder.
2. Perform Left Anti Join and Right Anti Join:
- Use Power Query to implement the Left Anti Join and Right Anti Join to compare records and calculate counts for mismatches.

 

b. Generate the Summary Table
1. After calculating the counts, create a summary table with the following fields:
- `Date`: The date of the comparison (e.g., file modification date or a user-input date).
- `Dataset1_Count`: Count of mismatched records from Dataset1 (from Left Anti Join).
- `Dataset2_Count`: Count of mismatched records from Dataset2 (from Right Anti Join).

2. Append New Data to the Historical Table:
- Maintain a historical table in Power BI or an external database (e.g., Excel, SQL Server).
- After every file comparison, append the new summary to this table.

---

2. Automate the Process
Use a combination of Power Query and Power BI features to automate the workflow:

a. Use Power Query to Combine Data
1. Folder Connector for New Files:
- Use Power Query's folder connector to dynamically load new files as they are added to the source folder.
- Transform and clean the data as needed.

2. Dynamic Comparison Logic:
- Create queries in Power Query to perform the Left Anti Join and Right Anti Join operations dynamically as new files are added.

 

b. Maintain the Historical Summary
1. External Storage (Preferred for Scalability):
- Store the historical summary in an external database (like SQL Server) and refresh it in Power BI.
- Use tools like Power Automate or a custom ETL script to append new summaries to the historical table.

 

2. Within Power BI (For Simpler Use Cases):
- Use Append Queries in Power Query to combine new summary data with existing data stored in Power BI.

 

3. Visualize Trends Over Time
1. Create a Time-Series Visualization:
- Use the historical summary table to create visuals like line charts, bar charts, or area charts to display trends over time.
- X-Axis: `Date`
- Y-Axis: `Dataset1_Count` and `Dataset2_Count` (or other metrics).

2. Add Custom Filters:
- Add filters to visualize trends by specific date ranges or datasets.

 

4. Advanced Options
- Incremental Refresh: If you use Power BI Pro or Premium, configure incremental refresh for the historical summary table to optimize performance.
- Parameterized Comparisons: Create parameters to control which files are compared dynamically.
- Alerts for Data Changes: Set up Power BI alerts to notify stakeholders when counts exceed certain thresholds.

 

 Example Output

Date

Dataset1_CountDataset2_Count
2024-11-182518
2024-11-193022
.........

This workflow ensures that your date-wise summary is updated efficiently and provides a scalable way to analyze trends over time. Let me know if you need more details or specific implementation steps!

 

Please mark this as solution if it helps. Appreciate Kudos.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.