Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I have a query, in my reoprt i have sales comparison on basis of current year (2017)and previous year(2016). Current year is taken as following
current year and previous year
Let currentdate =DATE(Today(1)-1,'YYYYMMDD');
Let Curr_Year = Year(Today());
Let Prev_Year = (Year(Today())-1);
so, here its working fine but if i want to show a comparison between year 2015 and 2017 and for that i am entering year in (year comparison)previous year as 2015 in input box (attached document ) ,the report is not showing correct results so please help me how can i manage this issue?
How can i define variable (curr year and prvious year) so that my report can be seen for comparison between any two year's sale
thanks in advance
regards
sakshi
Hi Sakshi,
Do your expressions use your Year variable in set analysis?
e.g. sum({<year = {'$(vYear1)'}>} fact)
That is how you would normally handle this. See attached sample.
These are my different expressions for different years (above in image)
for 2016 expression (this is the expression)
=num(
sum(if(Sold_Date <= MakeDate(Prev_Year,month(To),day(To)) and Sold_Date >= MakeDate(Prev_Year,month(From),day(From)), [inv value]))/Sales_INR_Unit,
'#,##0.0')
does your data model have a master calendar table?