Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
abhaytrip
Contributor

showing Previous month available in qlikview

Hi guys ,

Im facing an issue where I have Date in the qvd from 1/1/2017 to 3/1/2018 in the format MM/DD/YYYY.

but in qlikview I need to show Data only till Feb , 2018 that is (2/1/2018).

from 1/1/2017 to 2/1/2018

So thats basically excluding the previous month data i need to represent it considering that im in the month of April now.

What ways is this possible for me to go ahead with ?

Thanks

1 Solution

Accepted Solutions
abhaytrip
Contributor

Re: showing Previous month available in qlikview

Thanks all , this worked !

where dateField<=date(MonthStart(Today(),-2))

View solution in original post

4 Replies
shiveshsingh
Honored Contributor

Re: showing Previous month available in qlikview

What about applying filter while loading data from qvd?

load * from AVC.qvd(qvd) where Date <='2/1/2018'..make sure format matches

Re: showing Previous month available in qlikview

Perhaps this?

Table:

Load * From Table;

Left Join(Table)

Load Min(DateField) as MinDate,

Max(DateField) as MaxDate

Resident Table;

LET Vmin = Peek('MinDate');

LET Vmax = Peek('MaxDate');

Final:

Load * Resident Table Where Date#(DateField, 'YourFormat') >= Date($(Vmin), 'YourFormat') and Date#(DateField, 'YourFormat') < AddMonths(Date($(Vmax), 'YourFormat', -1)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

Re: showing Previous month available in qlikview

hi,

if you want a load without problems regarding the date you should use a numeric date and then remake your date as you desire. ( num(Date)  -> the date to numeric format )

hope it helps,

Andrew

abhaytrip
Contributor

Re: showing Previous month available in qlikview

Thanks all , this worked !

where dateField<=date(MonthStart(Today(),-2))

View solution in original post