Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have data in my dashboard with fiscal year 2016 and 2017
so I want to restrict the data to load >=01-01-2018
I don't have month field only fiscal year in the data.
how to get this?
Hi,
do you want to do it on the script or on a specific chart ?
if you want to do it on the script, what is the exact format of your date field ? is it DD-MM-YYYY ? or MM-DD-YYYY ?
So you want to restrict data with condition >=01-01-2018. Do you have data for 2018 in the table? and if you have Date field?
use YearStart() Function
Date>=YearStart(today())
e.g
X:
load
Date(MakeDate(2016)+RecNo()-1,'DD/MM/YYYY') as Date,
rand()*1000 as Sales
AutoGenerate 365;
Concatenate
load
Date(MakeDate(2017)+RecNo()-1,'DD/MM/YYYY') as Date,
rand()*1000 as Sales
AutoGenerate 365;
load
Date(MakeDate(2018)+RecNo()-1,'DD/MM/YYYY') as Date,
rand()*1000 as Sales
AutoGenerate 365;
STORE X into 'C:\Project\MyTable6.qvd'(qvd);
DROP Table X;
load *
From 'C:\Project\MyTable6.qvd'(qvd)
where Date>=YearStart(Today());
I don't have date field
I have month field and fiscal year field
If u have only Month and Year Field then use
=Yearstart(MonthName(Today()))
Hi
thanks for the response its worked but
one small doubt- Date>=YearStart(today()) this will give me what ever the data and how many months data available starting from jan 1st 2018 am I right?
Yes it will give u all 12 month data up to your maxdate