Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Button Selection with Actions

Hello,

I want to show only current year and current month when user click the button

Lets assume, i have data like below

Date               Sales

01/01/2016     10

01/05/2016     20

01/01/2015     20

01/01/2014     30

01/01/2013     40   

01/01/2012     50

01/01/2011     60

01/01/2010     70


Here, I want to create when user click the Button then i want to show data which related to

Max(Year)  - Current Year

Current Max Month


How to add this actions into button?


Please help me                        

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)
1 Solution

Accepted Solutions
Highlighted

5 Replies
Highlighted
Specialist II
Specialist II

At Back End only, create a field as

num(monthname(Date)) as MOnthname_Num

Now in properties of a buttoon define an action as

Select in Field >>

     Field>> Monthname_Num

     VAlue>> max(Monthname_Num)

This way the data in chart will always reflect for selected or the max year month....

reards

Nitin

Highlighted

Can you please send the qvw

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)
Highlighted

I would use a date field to do this

='>=' & Date(MonthStart(Max({1}Date)), 'MM/DD/YYYY') & '<=' & Date(MonthEnd(Max({1}Date)), 'MM/DD/YYYY')

Assuming your date format is MM/DD/YYYY and not DD/MM/YYYY

Highlighted

Highlighted

Thanks Sunny

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)