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

IGNORE Filter on expression KPI

Hello friends,

I am struggling with this Issue

I have a filter pane with a field named period term that includes 2 segments, 1-Month and 12-Month

And

I have a KPI which its expression is

Count(distinct {<[GSDP.termstartdate_vp.autoCalendar.Year],
[GSDP.termstartdate_vp.autoCalendar.Month],CRM.I_CMPGN={'9098'}>}VIN_)

The VIN_ is the Iduser

This expression is making a count distinct of this ID users that have received an E-mail (9098)

I want that when selecting any segment from the filter pane it doesn't affects this KPI

I have tried by including the 1 regular expression but didn't work, 

also I have tried adding $:: to pick only the I_CMPGN 

I thank any help

Regards, 

Labels (4)
1 Solution

Accepted Solutions
FelipeK16
Contributor III
Contributor III
Author

Yes, the If condition was the issue

Instead of this I have used

=aggr(Only({<CRM.periodterm = {'1-Month','12-Month'}>}
[CRM.periodterm])
,CRM.periodterm)

And now the suggested expression is ignoring the filter

Count(distinct {<[GSDP.termstartdate_vp.autoCalendar.Year],
[GSDP.termstartdate_vp.autoCalendar.Month],CRM.I_CMPGN={'9098'} ,FieldToIgnore = >}VIN_)

 

View solution in original post

4 Replies
QFabian
Specialist III
Specialist III

Hi @FelipeK16 ,if i understood well, you just have to add the field/filter inside the set analysis to avoid its filtering

 

Count(distinct {<[GSDP.termstartdate_vp.autoCalendar.Year],
[GSDP.termstartdate_vp.autoCalendar.Month],CRM.I_CMPGN={'9098'} ,FieldToIgnore = >}VIN_)

QFabian
FelipeK16
Contributor III
Contributor III
Author

Hey Fabian thanks a lot for your reply, you understood well, I don't know why when adding the field as you suggest, when using the filter which is the same field, it is still afecting the KPI, 

This is the measure as you suggested

Count(distinct {1<[GSDP.termstartdate_vp.autoCalendar.Year],
[GSDP.termstartdate_vp.autoCalendar.Month],CRM.I_CMPGN={'9098'},CRM.periodterm>}VIN_)

And I have this condition on the filter 

=if(Match(CRM.periodterm,'1-Month','12-Month'),CRM.periodterm)

I have implemented this condition because I want the filter only to show those period terms

1 Month and 12 Month, 

Do you think the condition If can be the Issue that is not letting the expression to ignore the field periodterm?

QFabian
Specialist III
Specialist III

Probably, maybe you can create another periodo field with just the desired values and use that new field instead

QFabian
FelipeK16
Contributor III
Contributor III
Author

Yes, the If condition was the issue

Instead of this I have used

=aggr(Only({<CRM.periodterm = {'1-Month','12-Month'}>}
[CRM.periodterm])
,CRM.periodterm)

And now the suggested expression is ignoring the filter

Count(distinct {<[GSDP.termstartdate_vp.autoCalendar.Year],
[GSDP.termstartdate_vp.autoCalendar.Month],CRM.I_CMPGN={'9098'} ,FieldToIgnore = >}VIN_)