Forum Discussion
Aligning Data With different dates
- 3 months ago
Hi Del235 ,
Thank you for the clarification. I was able to reproduce the scenario using a single dataset where both events are stored in the same table with a single Date column and Sales field.
In this approach, I first added a custom column in Power Query to create an aligned date using a 728-day offset for the older event data so that the weekdays match correctly between 2024 and 2026. After that, I pivoted the Event column using the Sales column as values and then performed a Group By operation on the aligned date to combine both event values into the same row.
This produced the expected output where both events align correctly by weekday on a single date axis.
I have attached the PBIX file for reference. Please review the Power Query steps and transformations in the file for better clarity on the implementation.
Please let us know if you need any further assistance.
Hi,
Try this approach
- Ensure that the seconf colum is named the same in both tables, say it is anamed as Sales
- In each table, create a third column with the name of th product in each row
- In PQ, append the 2 tables. Name this table as Data
- Create a Calendar table
- Create a *:1 relationship from the Date column of the appended table to the date column of the Calendar table
- To your matrix visual, drag the Date column from the Calendar table
- To your matrix visual, drag the Product column from the appended table
- Write this measure: Measure = sum(Data[Sales])