I need to calculate a year over year percent change of tickets created based on the year I select with a slicer.
E.g. if I choose 2018 from the slicer, it should compare the 2018 vs 2017 tickets, if I select 2019, compare 2019 vs 2018 ticketsand so on. But if I select blank, it should return blank.
I created a DAX that uses 2019 as a date reference, and a comparisson of this year vs previous year however this is static and compares only 2 years, and I want it to be dynamic depending on the slicer selection.
I attach the PBI
And the excel
Is is possible to have a dax with the conditions desctibed above?
Solved! Go to Solution.
Looks very solid. Just one thing, how can I get the result as 45.87% instead of 145.87%?
I tried swtiching the numerator and denominator but didnt work.
Change % = IF ( HASONEVALUE ( report1576508921493[Year] ); DIVIDE ( [Number of Tickets]; CALCULATE ( [Number of Tickets]; FILTER ( ALL ( report1576508921493[Year] ); report1576508921493[Year] = MAX ( report1576508921493[Year] ) - 1 ) ) )-1; BLANK() )
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
We are excited to announce the Power BI Super Users!
Overview of Power BI 2020 release wave 2!
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.