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

Reduce document based on Year

Hi All,

I have a scenario where the QlikView dashboard needs to be reduced based on current Fiscal Year and Previous Fiscal Year(derive the years dynamically).

Right now we achieve the same by static reduction.

Any inputs on how this can be done dynamically?

thanks,

Rajesh Vaswani

4 Replies
MK_QSL
MVP
MVP

Do you want to reduce the data from back end...

You can use something like below while loading

Load * From TableName Where Match(Year,Year(Today()),Year(Today())-1);

tresesco
MVP
MVP

Using publisher? A quick idea hits:

Create an inline table and join it with your calendar table, like:

Let vCYear=Year(Today());
Let vLYear=Year(Today())-1;

Reduction:

Load

          ReducYear,

          ReducYear as Year

Inline [
ReducYear
$(vCYear)
$(vLYear)
];

Right Join   // or leave as it is to maintain association by Year field

Load Year, Date, Month From <>;

Now reduce the application in publisher on field ReducYear.

MayilVahanan

Hi

You can able to set your year in the variable and use that wherever its required.

Ex:

Let ThisYear = Year(Today());

Let PreviousYear = Year(Today())-1;

Then Use these variable in where condition.

Load * From table where match(Year,$(ThisYear), $(PreviousYear));

So u can easily alter the expression in one place.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rajeshvaswani77
Specialist III
Specialist III
Author

Hi,

In static I will have to select the years in the QEMC.

If I use dynamic it will create 2 dashboards if there are two years in the inline table.

I need single dashboard while reduction for any no. of years. If no years then no reduced dashboard.

thanks,

Rajesh Vaswani