Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
soniasweety
Valued Contributor III

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?

Tags (2)
7 Replies
YoussefBelloum
Esteemed Contributor

Re: Monthly

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
Honored Contributor

Re: Monthly

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?

Partner
Partner

Re: Monthly

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
Valued Contributor III

Re: Monthly

I don't have date field

I have  month field and fiscal year field

Partner
Partner

Re: Monthly

If u have only Month and Year Field then use

=Yearstart(MonthName(Today()))

soniasweety
Valued Contributor III

Re: Monthly

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?

Partner
Partner

Re: Monthly

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