Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qliksense - Ignore only one selection

Is there any other form of set analysis that would ignore only one selection in Qliksense aside the code below?

Both codes are not ignoring the month selection. I'm pretty sure that I'm suing the correct field, Month.

If(vCurrency_1 = 'CND',

Sum({$<Currency = {'CND'},Month>}Budget),

    Sum({$<Currency = {'USD'},Month>}Budget)

   )

or

If(vCurrency_1 = 'CND',

Sum({$<Currency = {'CND'},Month = >}Budget),

    Sum({$<Currency = {'USD'},Month = >}Budget)

   )

5 Replies
sunny_talwar

From what I know and have seen... this is the only way.... would you be able to share images to show the changing output with and without selection in Month field? Also, is month a derived field or is that something you create in the master calendar?

jmvilaplanap
Specialist
Specialist

Hi,

You must to be careful with the model, because if you´re filtering the app with a field "dependent" of this field (Month) Maybe this action will omit the filter.

For example if you have a month and monthnum and your filter modifies monthnum, this field is not ommited in the set analysis.

Regards

Anonymous
Not applicable
Author

Did check and confirmed that this is thing!

Month selection is coded in this manner, =Num(Month, 00)

How can I fix my code to KPI? Below is incorrect expression.

If(vCurrency_1 = 'CND',

Sum({$<Currency = {'CND'}, Num(Month, 00) >}Budget),

    Sum({$<Currency = {'USD'},Num(Month, 00) >}Budget)

   )

jmvilaplanap
Specialist
Specialist

Hi,

You can´t use functions as fields in set analysis. If the filter affects to Month, doesn´t matter the "NUM".

If(vCurrency_1 = 'CND',

     Sum({$<Currency = {'CND'}, Month= >}Budget),

     Sum({$<Currency = {'USD'}, Month= >}Budget)

)

Also you can make some checks,

if(vCurrency_1 = 'CND',

     1,

     2

)

and check if the if statement is running right, and so on

Regards

sunny_talwar

Why don't you create a new field in the script like this

Num(Month, '00') as MonthNum

use this as the filter and ignore selection in MonthNum