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: 
ronaldwang
Creator III
Creator III

Button to select one or all

I have a dimension called month, where “Jan, Feb, Mar…Dec” is stored, where I want to give use to select one of the months (and the default will be always current month). On top of that I also want to give the user to select either current month only or YTD (which means to select all the previous months). Any idea on how to implement this? Many thanks

 

1 Solution

Accepted Solutions
prat1507
Specialist
Specialist

Hi Please use this

Tab1:

LOAD * inline [

Months

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

];

Let v_currMth=Month(Today());

Tab2:

LOAD * inline [

Status, Months

Curr, $(v_currMth)

];

Tab3:

Load 'YTD' as Status,* Resident Tab1

where date(month(date#(Months,'MMM')) )<= date(Month(Today()));

Create a listbox with Status and use.

Regards
Pratyush

View solution in original post

2 Replies
prat1507
Specialist
Specialist

Hi Please use this

Tab1:

LOAD * inline [

Months

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

];

Let v_currMth=Month(Today());

Tab2:

LOAD * inline [

Status, Months

Curr, $(v_currMth)

];

Tab3:

Load 'YTD' as Status,* Resident Tab1

where date(month(date#(Months,'MMM')) )<= date(Month(Today()));

Create a listbox with Status and use.

Regards
Pratyush

ronaldwang
Creator III
Creator III
Author

thanks Pratyush, it is nice