Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want if I select date range from 1st jan 2014 till 2nd feb 2016 then the data 2016 should become current year and date 2014 should become previous year in chart so for that how to declare variable vstart (starting date in calender) and variable vend(ending date in calender)
also what will be the corresponding expressions for both previous year and current year sales in charts
i have used these expressions for current year and previous year
previous year
=num(sum(if(Sold_Date >=vstart and Sold_Date<= vend, [inv value]/Sales_INR_Unit)),'#,##0.0')
current year
=num(sum(if(Sold_Date >=vstart and Sold_Date<= vend ,[inv value]/Sales_INR_Unit)),'#,##0.0')
but both previous year and current year are giving same values
so please suggest the appropriate expressions ?
Try this for Prev year and show the same image?
=num(sum(if(Sold_Date >=AddYears(vstart, -1) and Sold_Date<= AddYears(vend, -1), [inv value]/Sales_INR_Unit)),'#,##0.0')
Try this?
=num(sum(if(Sold_Date >=AddYears(vstart,1) and Sold_Date<= vend, [inv value]/Sales_INR_Unit)),'#,##0.0')
is this expression used for previous year?
s
what about current year? that wil remain same?
i have declared variable as vstart=getcurrentselection(sold_date)
is this correct?
What you shown in line is correct to me? Are you facing any challenge. If you want to test them use Text object to understand how and what it returned?
yes i am facing one problem if i am using date range from 1st jan 2017 to 15th jan 2017 the data in previous year is displayed as o and current year has got some sales.
but i want on selecting date 1st jan 2017 to 15th jan 2017 under previous year the value should not be displayed as 0 rather it should have value one year prior to current year
Try this for Prev year and show the same image?
=num(sum(if(Sold_Date >=AddYears(vstart, -1) and Sold_Date<= AddYears(vend, -1), [inv value]/Sales_INR_Unit)),'#,##0.0')
I believe you got hat you need, So i would request you to do your job to close this thread by flag "Correct Answer" for next lander users can easy understand the same situation..
Best,
Anil