Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hello Comunity,
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?
MyMeasures:
Solved! Go to Solution.
Hi @ys034 ,
Here's a screenshot of the test I ran, and @amitchandak 's formula was able to return the correct results. Could you please share your PBIX file?
Best Regards,
Winniz
@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)
return
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?
Hi @ys034 ,
Here's a screenshot of the test I ran, and @amitchandak 's formula was able to return the correct results. Could you please share your PBIX file?
Best Regards,
Winniz
i looked at your example file and now it works i had the calculation in the wrong table
thanks a lot
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
MyMeasure:
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.