Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
mendes094
Contributor III
Contributor III

Filter doesn't apply correct in Dashboard

Hello, 

I do a dimension with the intention to create a filter on the panel.
=if(
Match(NM_NEGOCIO,'AA','BB','CC', 'DD')
and Match(CD_MARCA_PRODUTO,01, 02, 03), 'ALP',

if(NM_NEGOCIO = 'NE' and ABASTECIMENTO_COS > 0, 'ALP', 'NÃO ALP')
)

But when the User filter ALP on the panel, the filter doesn't respect this expression.

mendes094_0-1742584187664.png

I need do an expression apply the conditional ABASTECIMENTO_COS > 0 just for NM_NEGOCIO = 'NE', 
So when I choose ALP, the returns be something like this:

NM_NEGOCIO = 'AA' or 'BB' or 'CC' or 'DD',and

CD_MARCA_PRODUTO = 01 or 02 or 03, and

NM_NEGOCIO = 'NE' and ABASTECIMENTO_COS > 0 (this conditional is just for NM_NEGOCIO = 'NE').

 

Anybody can Help me.

 

 

 

Labels (2)
6 Replies
Chanty4u
MVP
MVP

Try this 

If(

    (Match(NM_NEGOCIO, 'AA', 'BB', 'CC', 'DD') 

    AND Match(CD_MARCA_PRODUTO, '01', '02', '03'))

    OR 

    (NM_NEGOCIO = 'NE' AND ABASTECIMENTO_COS > 0), 

    'ALP', 

    'NÃO ALP'

)

mendes094
Contributor III
Contributor III
Author

Doesn't work, its strange, because when I export in Excel and apply the filter works.

But if I apply the filter before export doens't work rsrs

 

Chanty4u
MVP
MVP

Please check the data types as you have numeric values 

 

You can remove quotes around 

If(

    (Match(NM_NEGOCIO, 'AA', 'BB', 'CC', 'DD') 

    AND Match(CD_MARCA_PRODUTO, 01, 02, 03)) 

    OR 

    (NM_NEGOCIO = 'NE' AND ABASTECIMENTO_COS > 0), 

    'ALP', 

    'NÃO ALP'

)

 

And you can debug step by step in straight table that wil help you to identify where exactly causing the issue 

 

 

David_Friend
Support
Support

I've been told this is resolved now, can you confirm?

mendes094
Contributor III
Contributor III
Author

The last step  (NM_NEGOCIO = 'NE' AND ABASTECIMENTO_COS > 0) is the error, 

It's not actually wrong, it's just that it applies the "ABASTECIMENTO_COS > 0" filter to the entire database, remembering that this error only occurs when filtering directly in the Qlik Sense table, if I export to Excel and filter it works normally.

Very strange,
I don't know if it's better to make this column in the script, but I'll face another challenge because they're from different tables.

mendes094
Contributor III
Contributor III
Author

Doesn't work.