Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Everyone,
I'm wanting to create an interactive table which allows a user to filter for any two different weeks, and the table will then compare the two weeks selected.. and then from there I want to create columns which calculate growth percentages and other relevant metrics.
This is what my data set looks like:
| SKU No. | Sales $ | FY | Week Number |
| 01 | 100 | 2022 | 01 |
| 01 | 230 | 2023 | 02 |
| 01 | 120 | 2024 | 01 |
| 01 | 150 | 2024 | 02 |
| 01 | 250 | 2023 | 01 |
| 02 | 140 | 2022 | 01 |
| 02 | 130 | 2024 | 01 |
| 02 | 160 | 2024 | 02 |
Effectively I want to be create an interactive table like this and I am able to filter for different weeks of my choosing.
| SKU Item | Sales $ (Filter Selected: FY 2022, Week 01 | Sales $ (Filter Selected: FY 2024, Week 02) | Difference $ |
| 001 | 100 | 150 | 50 |
| 002 | 140 | 160 | 20 |
Thanks so much!
Solved! Go to Solution.
Hi @eykc,
1. You can create two same tables using your dataset.
2. Create a SKUNO. dimension table
3. Build the relationship between the dimension table and the fact table.
4. Then create a measure to calculate the difference between the Sales $ columns of the two tables.
Difference = SUM(Table2[Sales2 $])-SUM('Table1'[Sales $])
5.Build the table visual using the SKUNO. Column in the dimension table, the Sales $column for both fact tables, and the Difference measure.
The FY column and the Week Number column of the two fact tables are used to build the slicer for filtering.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @eykc,
1. You can create two same tables using your dataset.
2. Create a SKUNO. dimension table
3. Build the relationship between the dimension table and the fact table.
4. Then create a measure to calculate the difference between the Sales $ columns of the two tables.
Difference = SUM(Table2[Sales2 $])-SUM('Table1'[Sales $])
5.Build the table visual using the SKUNO. Column in the dimension table, the Sales $column for both fact tables, and the Difference measure.
The FY column and the Week Number column of the two fact tables are used to build the slicer for filtering.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the below tutorial - Hope this helps!
Compare any week/Year using 2 Slicers as input in PowerBI | MiTutorials (youtube.com)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.