Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All
I have sales report as per following format
Product CM LM
--------------------------------
ABC 100 80
XYZ 200 100
PQR 400 200
The expression required for calculation of sales like wise comparision for eg. if today is 15 feb 2013 then sum(sales) as on 15/feb/2013 required
and for lm sum of sales as on 15-feb-2012 (Likewise). Now if date is 28-feb-2013 for cm then for last year it sould take 28/feb/2012 as well as 29/feb/2012
due to last year was a leap year.
Please help to build this expression.
I have attach sample application for refer
Thanks in advanace
Vikas
Hi Vikas,
you can create a calculated dimension (see attached app.) and map the date from 29/02/ to 28/02/, independend of the year.
Even better in my oppinion is to let the (field-)calculation be done during loading time, instead of calculation a dimension online.
May be like this
LOAD
*,
=if(SubField(date,'/',1) = '29' and SubField(date,'/',2) = '02',
'28/02/' & SubField(date,'/',3),
date) AS date
FROM somewhere;
HtH
Roland
Hi Vikas,
you can create a calculated dimension (see attached app.) and map the date from 29/02/ to 28/02/, independend of the year.
Even better in my oppinion is to let the (field-)calculation be done during loading time, instead of calculation a dimension online.
May be like this
LOAD
*,
=if(SubField(date,'/',1) = '29' and SubField(date,'/',2) = '02',
'28/02/' & SubField(date,'/',3),
date) AS date
FROM somewhere;
HtH
Roland
Thanks a Lot Sir , I will Try n Get Back you..
Bye
Vikas