Forum Discussion
Visualization breaks with DATEADD function and a slicer with non-consecutive dates
Hi!
I have a visualization that compares this year's data to last year's + I have a slicer to represent different months. It works fine while filtering on consecutive months, but if I filter based on non-consecutive months, the visualization breaks for the previous year's data. How can I prevent this from happening?
I know, filtering based on non-consecutive months is not something users would generally do, but I just don't want the visualization to break, I'd rather it show Blank than "Could not show visualization"
Thanks!
DATEADD works with continues Dates..If the above trick don't work try using another formula..( many ways to show last years values )
4 Replies
- konstantinosMemorable Member
Not sure if that will work ( in Pivot tables works ) depending the graph...You can try though.... wrap your measure with
Measure = IF( HASONEVALUE( DateTable[Year]); Your Measure ))
- konstantinosMemorable Member
DATEADD works with continues Dates..If the above trick don't work try using another formula..( many ways to show last years values )
- KristinaBakicFrequent Visitor
Thanks!
I did know the "continous dates" restriction, but thought it mattered only in the context of a single function and didn't realize it applied to this case too. Still learning!
:)