7 Replies Latest reply: Mar 25, 2016 10:32 AM by Annick Whitfield

Line Chart - Months without sales - Select a month

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

• Re: Line Chart - Months without sales - Select a month

May be try this:

If(GetSelectedCount(MonthField) = 0, Sum({\$<Country -= {'US'}>}Price) +Sum({1} 0), Sum({\$<Country -= {'US'}>}Price))

• Re: Line Chart - Months without sales - Select a month

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

• Re: Line Chart - Months without sales - Select a month

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

• Re: Line Chart - Months without sales - Select a month

hi

Annick Whitfield

plz try this step

go to chart properties

go to Data handling

uncheck Show zero values

Thanks & Regards

Ahmar Ansari9

• Re: Line Chart - Months without sales - Select a month

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 :-)

• Re: Line Chart - Months without sales - Select a month

Hi Annick,

Are you looking to highlight the months which you have selected and still make no selection?

Thanks,

Sangram.

• Re: Line Chart - Months without sales - Select a month

Hello Sangram,