Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
have the expression
as one line on a chart
count(distinct{< CalendarYear = {"$(=max(CalendarYear))"}>} [Custid]) 'Current Year'
and this on a second line on a chart
count(distinct{< CalendarYear = {"$(=max(CalendarYear)-1)"}>} Custid) 'Previous year'
When i pick from a filter pane CalendarYear e.g 2015
current year line appears, but previous year turns to 0, when there is 10 years worth of data
how can i please amend the set analysis to avoid this
kind regards
I am going to guess that the "Calendar Year" you use in the filter, is the same one you use in the Set Analysis.
That means when you select 2015 in the filter, it limits your data set to only be CalendarYear = 2015. Your Set Analysis will therefore not return anything for 2014, 2013.
You could create a standalone filter list, in the load script, from CalendarYear, calling it something that ensures it will not automatically link to a field e.g. "MyFilterYear"
Then use that dimension as your filter, changing your Set Analysis to use MAX(MyFilterYear)
Are you making the selection just the the CalendarYear field or are there other calendar related fields where you are making selections?
Hi
just the CalendarYear field as a filter pane
please help
Would you be able to share screenshots of with and without selection?
Hi
no really but
Date is main field of order data
this links to a calendar table, where it links to date, and then to a column called CalendarYear, and column CalendarMonth ect.
the same happens on a pivot chart too.
please help
I don't see anything wrong with the expression you have posted. Unless you can share a sample or screenshot, not sure if I can provide any advice.
Hi
i basically have a pivot table (Same for line chart ) that as Months on left hand side... and three columns on the right
Current year, Year -1, and Year-2
i want if someone picks from the filter pane a calendar year 2015
current year becomes 2015, Year -1 shows 2014, and year -2 shows 2013
Please help
I am going to guess that the "Calendar Year" you use in the filter, is the same one you use in the Set Analysis.
That means when you select 2015 in the filter, it limits your data set to only be CalendarYear = 2015. Your Set Analysis will therefore not return anything for 2014, 2013.
You could create a standalone filter list, in the load script, from CalendarYear, calling it something that ensures it will not automatically link to a field e.g. "MyFilterYear"
Then use that dimension as your filter, changing your Set Analysis to use MAX(MyFilterYear)
Hi
thank you team