Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

open document

Hi ALl,

 

i have  year,month,quarter fields ... now my requirment is  when user open the document  it should be open  

max year and max quarter ...that related months.  

 

and same way  

the clear button  when user click it should come to default state means --max year  and max quarter to be selected as wel,

 

thanks

sony

Labels (1)
3 Solutions

Accepted Solutions
ruben_antelo
Partner - Contributor III
Partner - Contributor III

Hi,

 

you could try with month(<expression>) that will return month if <expression> is a date.

MonthName() would do the opposite effect, by the way.

 

If it is not working, you can do it in script or create a date and after that, ask for a month: 

month(makedate(year,month,day))

 

There are a lot of possibilities to achieve your needs.

 

BR,

 

Rubén Antelo

View solution in original post

ruben_antelo
Partner - Contributor III
Partner - Contributor III

Well... it is not the common way to work with QlikView, but with a simple modification in button "Start" and trigger on "Document On Open" this can be achieved.

 

Take a look at this attachment.

 

Best regards,

 

Rubén Antelo

View solution in original post

sunny_talwar

From what I am seeing, I am able to select multiple years

image.png

View solution in original post

27 Replies
ruben_antelo
Partner - Contributor III
Partner - Contributor III

Hi,

Please take a look at your example in this post.

 

I have added a opening trigger in your document and changed triggers in your 'Clear' button.

 

Best regards,

 

Rubén Antelo

jonathandienst
Partner - Champion III
Partner - Champion III

If you include set expression in your metrics to get the latest possible date, there is no need to have automatic selections. When nothing is selected, the objects will display the most recent period, year, quarter or date (per your requirements). When you select a date (month, year, etc), then the objects will display the selected date.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
soniasweety
Master
Master
Author

but .. there is one issue am facing.. when clear all. its coming default state but .. when u de select 2018 and select 2017 0r 2016 and clik on clear button.. its showing that year max quarter and all

how to avoid that
ruben_antelo
Partner - Contributor III
Partner - Contributor III

Hi,

 I have modified expressions, right now it is ok. 

Problem was that expression max(Fiscal_Year) is under the scope of selections. If you have selected 2017, max is 2017. To avoid this, we put max({1} Fiscal_Year) that will override the scope of the function to all your data universe.

 

Best regards,

 

Rubén Antelo

 

 

soniasweety
Master
Master
Author

but in fiscal month it shlud be selected 3 motnhs right? for max quarter 3 months will be there but now only one month is selected
albert_guito
Creator II
Creator II

Hi,

 

You have to use trigger, one in the documments properties and other in the button.

See the app attached with the triggers added.

 

Ag+

Ag+
ruben_antelo
Partner - Contributor III
Partner - Contributor III

Sorry...

 

I understood max month. This is the good one.

 

Best regards,

 

Rubén Antelo

albert_guito
Creator II
Creator II

Consider the @ruben_antelo comments about the max({1} Fiscal_Year) , it's not included in the sample
Ag+
soniasweety
Master
Master
Author

thanks all let me try in my original app and come back to you guys