Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
I have the below data .
CUSTID | GROUP | DATE(DD/MM/YYYY) |
C1 | G1 | 01/01/2017 |
C2 | G2 | 01/01/2018 |
C3 | G1 | 01/10/2017 |
C4 | G2 | 01/10/2018 |
In one of the chart ,i have to show bydefault YTD values .We are in 2018 ,so bydefault it will display from Jan-01-2018 to till date .
My metric is that : To count number of customers from YearToDate .
I created a variable like VYTD=Yearstart(MAx(date)) and VmaxDate=MAx(date).
Expression being : Count({<Date >=$(VYTD)<=$(VmaxDate)>} CUSTID ) .
Here i have Group as my Filter .
If i select Group=G1 ,then VYTD will be 01/01/2017 and VmaxDate=01/10/2017 .
So is it like do i have to ignore the Group selections while calculating the Variables here .
If i am having all required groups in all the years ,then there shouldn't be a problem i guess.?
While calculating the YTD variables, do we generally ignore all the filter selections which we use in reports / Frontend?
Need some help on this .
Thanks,
Anjee
try the following :
Count({$<Date >=$(VYTD)<=$(VmaxDate)>} CUSTID )
or
Count({1<Date >=$(VYTD)<=$(VmaxDate)>} CUSTID )
or
aggr(Count({<Date >=$(VYTD)<=$(VmaxDate)>} CUSTID ) ,GROUP)