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: 
R_Mendoza
Contributor III
Contributor III

Filter [saison/date]

Hola a todos

Tengo un problema al filtrar datos.

Tengo un Filtro con la siguiente condición:

=If(Right([Saison / Jahr], 4)>= Year(Today())-4 and Right([Saison / Jahr], 4)<= Year(Today())+1 and ([Saison]=1 or [Saison]=2), [Saison / Jahr]) 

--------------

=[Saison / Jahr] 

Cuando lo uso el filtro el KPI me devuelve 0 pero cuando no lo utilizo me devuelve datos.

Por que puede ser ?? Gracias anticipadas.

Filter con FormulaFilter con Formula

=If(Right([Saison / Jahr], 4)>= Year(Today())-4 and Right([Saison / Jahr], 4)<= Year(Today())+1 and ([Saison]=1 or [Saison]=2), [Saison / Jahr]) 

 

Filter not FormulaFilter not Formula

=[Saison / Jahr] 

Formula del KPIFormula del KPI

 
7 Replies
Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Hello R Mendoza,

 

This may be a small thing but did you try applying your filter like this:

=Date(If(Right([Saison / Jahr], 4)>= Year(Today())-4 and Right([Saison / Jahr], 4)<= Year(Today())+1 and ([Saison]=1 or [Saison]=2), [Saison / Jahr]) , 'M / YYYY')

And set expression like this:

SUM({<..., [Saison / Jahr]  = {"$(=vSaison_JahrVG)"}>} {#Stuck Auftag])

 

I hope that helps!

 

Kind regards,

S.T,

R_Mendoza
Contributor III
Contributor III
Author

Hello @Stoyan_Terziev 

I made the changes but the filter doesn't work.

[Saison / Jahr] =

Saison is only 1 and 2

and Jahr is only has the year.

LG,

Renzo

Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Can you please troubleshoot by manually replacing the variable with the value you expect to get from it?

Something like:

Sum({<... [Saison / Jahr] ={"1 / 2019"}>} ...)

 

If this doesn't work, the problem may be somewhere else (like in the [Saison / Jahr] filed for example).

And if it works, than we need to do make sure the data type of the variable output is the same as the data type of the [Saison / Jahr] field.

 

Regards,

S.T.

R_Mendoza
Contributor III
Contributor III
Author

image.pngimage.png

as soon as I use the filter it is set to 0 

Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Hi R Mendoza,

 

There may be a much quicker and more elegant solution that that one, but let's try something simple.

If the Filter Saison is based on an actual field, can you add this to your set expression:

Sum({<... [Saison / Jahr] ={"1 / 2019"}, Saison=>} ...)

If it is not, you can move the calculation behind this field to the back end and do this:

Sum({<... [Saison / Jahr] ={"1 / 2019"}, NewBackendSaison=>} ...)

 

I hope that helps!

 

Kind regards,
S.T.

R_Mendoza
Contributor III
Contributor III
Author

Hello @Stoyan_Terziev 
I tried ... but it still doesn't work.

It is very strange because it only happens when I write the expression in the filter.

R_Mendoza
Contributor III
Contributor III
Author

Hi everyone,
I continue without finding the solution ... Any ideas.