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

Default to data to current Year

Hi Folks,

Am new to qlikview. Am looking to default data in one of the 5 reports in a tab to only current year. There is year filter given where it changes dynamically if user selects .

I tried doing this. Year(date dim)=year(today()).Its not working

5 Replies
sunny_talwar

Use set analysis may be, but before you do that, create a Year field in the script

LOAD DateField,

           Year(DateField) as YearField

           ...

From ...;

and now use this

{<YearField = {$(=Year(Today())}>}

Anonymous
Not applicable
Author

Hello Madhu J

Do you want that report to always show current year data as default?  Once you use set analysis data in that report will  not be associated with any selections in your filter.

Thanks & Regards

Chintan

rahulpawarb
Specialist III
Specialist III

Hello Madhu,

Trust that you are doing good!

Please follow below steps to fix the problem:

1. Open the Document Properties (Ctrl + Alt + D) and locate Triggers tab

2. Select OnOpen option under Document Event Triggers and press Add Action(s)... button

3. This will popup Actions window. Press Add button.

4. Set Selection as Action Type and Select in Field As Actions

5. Mention the field you want to set i.e. [Current Year] and mention =Year(Today()) in Search String

5. Click ok to save the changes

6. Change the [Current Year] filter to different year than current, save the document and close the document

7. Once again open the document and you will see Current Year set as filter

Hope this will be helpful.

Regards!

Rahul

Not applicable
Author

Thank You for replying.

Can we do this without using set analysis. Only when dashboard page opens at first it , current year data should be populated else it should be dynamically changes according to filter selected. Using triggers is effecting whole tab.Can this be achieved for a single report.