Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Monthly

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?

7 Replies
YoussefBelloum
Champion
Champion

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 ?

shiveshsingh
Master
Master

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?

vishalarote
Partner - Creator II
Partner - Creator II

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());Capture4.PNG

soniasweety
Master
Master
Author

I don't have date field

I have  month field and fiscal year field

vishalarote
Partner - Creator II
Partner - Creator II

If u have only Month and Year Field then use

=Yearstart(MonthName(Today()))

soniasweety
Master
Master
Author

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?

vishalarote
Partner - Creator II
Partner - Creator II

Yes it will give u all 12 month data up to  your maxdate