Forum Discussion
PowerBI Percentage Difference between two selected dates in a filter
Thanks for the reply from ahadkarimi and monica345.
Hi EuroK4238 ,
Are you trying to do a percentage calculation on the values of the filtered recent date and ancient date in the matrix? If I understand you correctly, please see the steps below:
1.Create simple data:
2.Create a new table:
Date = VALUES('Balance Unpivot'[Date])
3.Use the Date column as the field of slicer:
4.The two original measures: RecentDate and AncientDate need to be modified.
AncientDate = MINX(VALUES('Date'[Date]),'Date'[Date])
RecentDate = MAXX(VALUES('Date'[Date]),'Date'[Date])
5.The final result is as follows:
Best Regards,
Zhu
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!
Hello Anonymous and thank you for your response.
Would this work with data that isn't aggregated, and for multiple companies? here is my proposed report:
my rows contain specific balance sheet data, so i can't aggregate them. what i need to show is the percentage change for every element of the balance sheet, between two filtered dates, for several companies. The first matrix in the picture shows the balance sheet data for multiple companies and periods, and i intend to show the percentage change for every balance sheet element between the oldest and most recent date, that way only one column has to be added to the matrix, not one for every variation for every selected period.
the second matrix, on the right, is where i was testing the AncientDate and Recentdate values, but i hope the variation can be added as a single column beside the filtered dates for every selected company.
The final result you show in the 5th step would be perfect if it were filtered by balance sheet element.
Here's a sample of the Balance Unpivot table, for reference.
Empresa is the Companies, Fecha is Date, Atributo is the balance sheet elements, and Valor is the Value for that balance sheet element, for a specific date, for a specific company.