is there a possibility to display the value of the last year based on a simple selection, for example, if the year 2021 is selected, it still shows me the year 2020 in addition, as the stacked column chart only allows me to pull in one value?
Solved! Go to Solution.
@ys034 , If you want to show two years. by selecting one year. You need an independent date table too
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = date(year(_max)-1,1,1)
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
thank you very much,
If 2021 is filtered it shows me last year what about if I filter 2020 and want to show me 2019 and so on.
With the current solution, it no longer shows me anything as soon as I filter 2020.
Are there any solutions for this?
The calculation works, but I only want to compare the filtered year with the one from last year, i.e.
2021 vs 2020, 2020 vs 2019 if I select 2021 it shows me all data retroactively
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.