The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
First time poster! I'd appreciate any help you can give me with this question...
I need to create a dynamic matrix and line chart that shows the percentage change over selected year columns. Example below.
There are 10 years in the report and a user can select any combination of years. The selected years need not be contiguous, but are displayed in order (L to R). If a user adds more years, the table recalculates to reflect all possible % changes. If only 1 year is selected you'd see a blank table/chart. I think this means that a date table may not be appropriate as I want the calculation to work over non-contiguous years.
The result I'm looking for is exactly the same as if you used a pivot table to show % Difference From (previous).
So from this:
Category | 2020 | 2022 | 2023 |
A | 405379 | 338089 | 411576 |
B | 263250 | 229064 | 279059 |
C | 19864 | 11037 | 15044 |
D | 90307 | 43171 | 125443 |
E | 30593 | 17600 | 29115 |
Grand Total | 809393 | 638961 | 860237 |
I want this:
Category | 2020 | 2022 | 2023 |
A | -17% | 22% | |
B | -13% | 22% | |
C | -44% | 36% | |
D | -52% | 191% | |
E | -42% | 65% | |
Grand Total | -21% | 35% |
And this:
Happy to provide more info.
Many thanks!
Chris.
Solved! Go to Solution.
Hi @ChrisIrvin ,
You need two separate date tables.
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi @ChrisIrvin ,
You need two separate date tables.
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi @ChrisIrvin
Please implement Field Parameter Ref - https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
Find the sample PBIX file, use a similar solution
https://drive.google.com/file/d/1UrOLacIjQhYo1wq0On_VeWP7zFAaTp7A/view?usp=sharing
If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS
Thanks
Pijush
Proud to be a Super User! | |