Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

selection in Month?

HI All,

I have doubt in MOnth Selection,

If i select Feb then Feb & Jan Should Select,

If i select Apr then Apr,Mar,Feb & Jan Should Select,

If I Select Aug then Aug,Jul,Jun,May,Apr,Mar,Feb & Jan Should Select & So on...

Is this Possible in qlikview...?

please let me know with some example

Regards,

Heather

15 Replies
its_anandrjs

Hi,

In the list box expression write expression

=if(MonthField <= Max(TOTAL MonthField) ,MonthField)

Ex:-

=if(Month <= Max(TOTAL Month) ,Month)

Regards

Anand

Not applicable
Author

HI Anand,

I tried , but it's showing Null Value..Can you share any example

Regards,

Heather

Not applicable
Author

hi,

do you want this for a purticular chart.??

and i guess you want to know that,if you can get month till date.

Reply if that is wat you want

thanks

sudhanshu shrivas

Not applicable
Author

hi,

you can bypass all the required fields and can use set expression (eg given below..

it will give data for >=num of Yearstart  to the current date selected.

=sum({<YearOfOrder=, WeekOfOrder=, DayOfOrder=,

OrderDate={">=$(=Num(YearStart(Max(MonthOfOrder))))

<=$(=Max(OrderDate))"}>} sales)

It will give you data for year till date.

thanks

sudhanshu shrivas

Not applicable
Author

If i select Feb then Feb & Jan Should Select,

If i select Apr then Apr,Mar,Feb & Jan Should Select,

If I Select Aug then Aug,Jul,Jun,May,Apr,Mar,Feb & Jan Should Select & So on...

can you give me an exmple on this..

its_anandrjs

Hi,

This expression works for single selection only like Mar then you get Jan,Feb,Mar or see this example

Let varMaxDate = Num(now());

Let varMinDate = Num(AddMonths( now(), -12));

LOAD

($(varMinDate) + IterNo() -1) as NumTimeStamp,

Timestamp($(varMinDate) + IterNo() -1)*12*60 as TimeStamp,

Date($(varMinDate) + IterNo() -1) as Date,

Month(Date($(varMinDate) + IterNo() -1)) as Month

AutoGenerate 1 While ($(varMinDate) + IterNo() -1) <= $(varMaxDate);

And add the List box with expression

=if(Month <= Max(TOTAL Month) ,Month)

Sele.png

Regards
Anand

preminqlik
Specialist II
Specialist II

in above srinivas statement small correction.. try below one.

=sum({<Month=,Year=,Day=,Date=,YearOfOrder=, WeekOfOrder=, DayOfOrder=,

OrderDate={">=$(=Num(YearStart(Max(MonthOfOrder))))

<=$(=Max(OrderDate))"}>} sales)

tyagishaila
Specialist
Specialist

What is IterNo()

its_anandrjs

Hi,

This is for example all load is the example. You have to use only this expression in any list box but it works well if date field is pure date format.

=if(Month <= Max(TOTAL Month) ,Month)

Regards

Anand