Forum Discussion
Visual disappears when date (year) is selected
Hello Community,
I have a combo chart showing sales revenue for 2019 and 2020. The chart is fine when ONLY 2020 is selected in the filter panes area. But the visual disappears with an error message when I select 2019. This is important because I have a Salesperson slicer at the top of my page that I use to select a salesperson.
I believe I undersand why, due to the dateadd - 1 part of the formula. I was thinking I needed to add AllSelected as part of the measure, but if so, not clear where to add it.
This formula refers to the line showing the variance.
There are two measures, both the same, for 2019 and 2020, for the column series.
3 Replies
- parry2kSuper User
Anonymous what error message? What you are trying to achieve? Not sure if you need to filter for year 2020 in your measure.
- amitchandakSuper User
Anonymous , is there something selected from date table.
your sum of shipment formula is wrong, hard code filter 2020 and then use dateadd for prior is not going to work
refer
Power BI — YTD Questions — Time Intelligence 1–5
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a - V-lianl-msftCommunity Support
Hi Anonymous ,
Based on your description, your data includes those for 2019 and 2020. When you choose 2019, you will get an error because the data before 2019 cannot be obtained.
You'd better describe your requirements clearly, so that we can understand your scenario more clearly.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.