The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I would like to work out % difference between 2 years for a set of values and having some trouble doing so.
First of all, let’s say I have the following sample of data
Year | Active/Inactive Sale | Deparment |
2020 | Active | Montevideo |
2019 | Active | Montevideo |
2020 | Inactive | Salto |
2020 | Active | Paysandu |
2019 | Inactive | Salto |
2019 | Active | Montevideo |
2020 | Inactive | Canelones |
2019 | Active | Canelones |
The column Year is a integer number not a date value.
I need to calculate 2023 vs 2022, vs 2021 vs 2020.
Montevideo | Salto | |||||
Active/Inactive Sale | 2019 | 2020 | % change | 2019 | 2020 | % change |
Active | 23% | 19% | -4% | 22% | 16% | -6% |
Inactive | 22% | 19% | -3% | 13% | 21% | 8% |
Mary | 24% | 22% | -2% | 12% | 26% | 14% |
I used this measure to calculate the chosen selection of the slicer
any suggest?
Hi @jfern78 I would recommend you to check link below, part Year-over-year growth, as this is one of the best practice. This solution require Calendar / Date table (and your data from Fact table as date type), but article is worth reading and implementation for your case.
Hope this help, kudos appreciated.
https://www.daxpatterns.com/standard-time-related-calculations/
Proud to be a Super User!
i made a column with correct FY Year/date, but when i try to calculate last year sales return me blank.
Hi @jfern78 use Date / Calendart table to "leverage" proper usage of Power BI time intelligence functions like YTD, MTD... do not put fact table year column in visual.
Proud to be a Super User!
Thanks, i will see it. i'm figuring out how to do it.
User | Count |
---|---|
26 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |