Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am creating 2 line charts which has Month in Dimension and Measure as sum(value) for 2021 and 2022. For 2021, I have data for all 12 months, but 2022 has only 3 values , hence all other months ignored in chart.
But is there anyway we can by default show all 12 months for 2022 and show value only if data is there.
Hi @Karthick30
This can be a bit fiddly, but should be possible.
What you need to do is ensure that each possible month is shown regardless of selections. Selections can be ignored by using the set analysis syntax {1}, but obviously you don't want to change the values, and multiplying by 0 will achieve that.
The expression will therefore be:
sum(value) + (sum({1}value)*0)
The problem you then have is that the line will show along at zero. You can potentially hide the line by colouring by an expression, something like:
=if(alt(sum(value),0) = 0, argb(255,255,255,255))
It will also force the Y axis to go from zero. Multiplying by null() rather than zero may work.
I tend to try and let Sense do what Sense wants to do, rather than forcing its hand. I learnt long ago that this can often make things much easier!
Hope that helps.
Steve