Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Dylangkx
Contributor II
Contributor II

Filters not applying even when selected.

Hi all,

I have a filter created to filter the data between 2 type of parts as follows:

Dylangkx_0-1716174317958.png

this is the formula used for the filter:
=if( ISNULL([causalreplacedpart]),[releatedcausing],[causalreplacedpart])

It basically combines 2 columns (that are alike) from 2 seperate table together to act as a filter for the data. However, whenever I try to select any of the options, nothing happens and it states no selections applied.

Dylangkx_1-1716174454262.png

Can't tell if its an issue with my formula (I have it within a straight table and the data displays correctly), or is my datasource too big to allow this filter to work correctly.

Do let me know if there are any fixes to this!

 

Labels (1)
1 Solution

Accepted Solutions
TauseefKhan
Creator III
Creator III

Hello @Dylangkx,
It seems that the main problem is with the filter expression not applying selections as expected.

Results: Example:  If ABC have Null then it will take Funtion ID column Fields 

TauseefKhan_0-1716180531302.pngTauseefKhan_1-1716180647777.png

=Aggr(
if(isnull(ABC), Funtion_ID, ABC),
Funtion_ID
)
Solution: you might consider using the Aggr function, which is often used in Qlik Sense to create calculated dimensions or measures that can be used in filters. 
=Aggr(
if(isnull([causalreplacedpart]), [relatedcausing], [causalreplacedpart]),
[YourDimensionField]
)

OR

Instead of using ISNULL, you can create a new field in the data load script that combines the two fields. This way, you'll have a single field to use in your filter, which should work more reliably.

CombinedField:
LOAD
if(isnull([causalreplacedpart]), [relatedcausing], [causalreplacedpart]) as [CombinedPart]
RESIDENT YourTableName;

After reloading your data with this script, you'll have a new field called CombinedPart that you can use directly in your filter pane.

** When applicable please mark the correct/appropriate replies as "solution". Please LIKE threads if the provided solution is helpful to. **

 

View solution in original post

4 Replies
TauseefKhan
Creator III
Creator III

Hello @Dylangkx,
It seems that the main problem is with the filter expression not applying selections as expected.

Results: Example:  If ABC have Null then it will take Funtion ID column Fields 

TauseefKhan_0-1716180531302.pngTauseefKhan_1-1716180647777.png

=Aggr(
if(isnull(ABC), Funtion_ID, ABC),
Funtion_ID
)
Solution: you might consider using the Aggr function, which is often used in Qlik Sense to create calculated dimensions or measures that can be used in filters. 
=Aggr(
if(isnull([causalreplacedpart]), [relatedcausing], [causalreplacedpart]),
[YourDimensionField]
)

OR

Instead of using ISNULL, you can create a new field in the data load script that combines the two fields. This way, you'll have a single field to use in your filter, which should work more reliably.

CombinedField:
LOAD
if(isnull([causalreplacedpart]), [relatedcausing], [causalreplacedpart]) as [CombinedPart]
RESIDENT YourTableName;

After reloading your data with this script, you'll have a new field called CombinedPart that you can use directly in your filter pane.

** When applicable please mark the correct/appropriate replies as "solution". Please LIKE threads if the provided solution is helpful to. **

 

Sayed_Mannan
Creator
Creator

Based on your description, it seems like the issue might be with the filter formula or the data source. Here’s a suggestion to debug this issue:

Check the Data Types: Ensure that the data types of the columns [causalreplacedpart] and [releatedcausing] are compatible. If they are not, you might need to convert them to a common data type.

Debug the Formula: You can create a new table or chart where you display the result of your formula along with the original columns. This can help you identify if the formula is working as expected.

Check for Null Values: If there are many null values in your data, it might affect the filter. You can handle this by using the IsNull function in the script;

Here’s a sample script to handle null values: In this script, first you need to combine both table:-

LOAD *,
If(IsNull(causalreplacedpart) or Len(Trim(causalreplacedpart))=0, releatedcausing, causalreplacedpart) as FilterColumn
FROM [YourCombinedTable];

FilterColumn will contain the value of causalreplacedpart if it’s not null; otherwise, it will contain the value of releatedcausing. You can then use FilterColumn in your filter.

Remember to replace [YourCombinedTable] your actual data source.

Check Data Source Size: If your data source is too large, it might affect the performance of the filter.
Consider optimizing your data model and reducing the size of your data source if possible.

Please try these steps and let me know if the issue persists. If it does, we might need to look into other potential causes.

Anil_Babu_Samineni


It basically combines 2 columns (that are alike) from 2 seperate table together to act as a filter for the data. However, whenever I try to select any of the options, nothing happens and it states no selections applied.


I might have look from bold part, do you have associated each already?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Dylangkx
Contributor II
Contributor II
Author

Hi TauseefKhan!

Thanks so much! Making the field an aggregate has solved the problem and allowed me to filter successfully!