Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a dashboard that shows sales comparison between Current Year(selected in listbox) and Previous Year.
I calculate the previous year Sales in the charts using the logic: sum({<[Year]={"$(=Max([Year])-1)"}>}[Sales])
The issue is that since there is no data for say April onwards for 2021, the charts show blank when April-Dec is selected in month listbox though it should show data for 2020. The months that don't have data for 2021 are greyed out in the Month listbox.
Attaching a screenshot to explain the issue.
Hi @AB108 , first all, you must remember that if there is not month April in 2021, and you clic on April, it is going to automaticaly to break the year selection, and pick the year that has values in April.
So, you can do a few test :
1.- please check wht happens modifying this :
2.- please check wht happens modifying this :
3.- Test with theses expressions :
exp1: sum({<[Year]={"$(=Max([Year]))"}>}[Sales])
exp2 : sum({<[Year]={"$(=Max([Year])-1)"}>}[Sales])
Hi @QFabian , Thanks for your reply.
The first two options dint work. The expression you added is exactly what I am using.
Any other way to get this to work.