Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
In reference to a previous post (Line Chart - Show Months without Sales), I was given the helpful advice to use this formula in order to display all months even without sales:
Sum({$<Country -= {'US'}>}Price) +Sum({1} 0)
I implemented it and it works very well (i.e. months without sales are shown):
I am now facing another issue:
If I select March, I get the following graph:
Ideally, I would like to show the months that have been selected (if any), but still show all months if no selection has been made. Would you know if there is a way to achieve this?
Many thanks
Kind Regards
May be try this:
If(GetSelectedCount(MonthField) = 0, Sum({$<Country -= {'US'}>}Price) +Sum({1} 0), Sum({$<Country -= {'US'}>}Price))
Thanks a lot Sunny for your reply. I tried the formula you suggested:
If ( GetSelectedCount(MonthName) = 0, Sum({$<Country -= {'US'}>}Price) +Sum({1} 0), Sum({$<Country -= {'US'}>}Price))
When selecting March, GetSelectedCount(MonthName) is 1, therefore the expression Sum({$<Country2 -= {'US'}>}Price2) should apply and give the correct result (i.e. only March should be displayed).
However for some reason, even if the expression Sum({$<Country2 -= {'US'}>}Price2) applies, all months are still displayed:
I will continue investigating...
Many thanks
Annick
Hello,
Just to share with you the results on my findings:
I replaced the formula:
Sum({$<Country -= {'US'}>}Price) +Sum({1} 0)
with
Sum({$<Country -= {'US'}>}Price) +Sum({$} 0)
and I now get the correct results for both scenarios:
1) No months is selected, all months are shown even if no values:
2) Month of May is selected ==> only May is shown:
I hope it helps.
Thanks
hi
plz try this step
go to chart properties
expand Add-ons
go to Data handling
uncheck Show zero values
hope this help you
Thanks & Regards
Ahmar Ansari9
Hi Annick,
Are you looking to highlight the months which you have selected and still make no selection?
Thanks,
Sangram.
Hello Ahmar,
Thanks for your reply. Actually I am not sure if my previous comment was clear but I got good results using this formula Sum({$<Country -= {'US'}>}Price) +Sum({$} 0).
The Show zero values needs is ticked.
I now have the following behavior (which is what I wanted):
1) No months is selected, all months are shown even if no values:
2) Month of May is selected ==> only May is shown:
I am not 100% sure why this formula works and if it is the best one but it gives the expected results 🙂
Hello Sangram,
I have added some comments in my previous reply. I hope it is clear.
Many thanks for your reply.
Annick