Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a filter with years 2017,2018,2019. For example when I select year 2018, I want to be able to compute the count(ID) of the previous year (2017) as well.
Any idea on how to achieve this?
See the attachment..
Thank you for your reply.
I have modified it to the following:
Count(distinct {<DATE={"$(=max(DATE)-365)"}>}ID)
But results shows 30/12/1899 no matter what I select. Any ideas?
you can use chart Function that named Above() , if you set year As dimension, and in Expression write Above(count(ID)), it calculate the previous count (ID) according to value of dimension that you set.
fist of all I suggest you to try it in the straight chart with year as dimension and 2 Expression
1- count(ID)
&
2- Above(count(ID))
and check and see does it work well for you or not.
I am getting '0' even when I have selected the dates
I will be using the dates as a filter. This is what it will look like
Test:
Load *,
Year(T_Date) as T_Year;
Load * inline
[
ID1,T_Date
1,2017-10-20
2,2017-10-20
3,2017-10-20
4,2017-10-20
5,2018-10-20
6,2018-10-20
7,2016-10-20
8,2016-10-20
];
Filter box : T_Date
Count(distinct ID)
Count(distinct {<T_Date={'$(=max(T_Date)-365)'}>}ID1)
The second expression always gives a value of '0'. Any solutions?
if you are using Date field as filter, then try something like this...
Count({<T_Year={'$(=Year(max(T_Date))-1)'}>}ID
It still shows '0'. I am trying to only select 1 date in the filter box. This expression will work if I select 2 dates.