Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
tajmohamed30
Creator III
Creator III

Conditional show/hide similar column names in Pivot table - New Task

Hi all,

In my pivot table I try to conditionally show below Fields with similar name

Vendor_Country & Vendor

Issue - when I select Vendor Country, the Vendor is also getting displayed in the pivot

I use separate filter pane object to choose required fields to display in table using below expression and this expression shows only required fields need to display in filter object

=Aggr(
Only({1<[$Field] = p({1<[$Field] = { "Vendor",,"Vendor_Country"}>})>} [$Field])
, [$Field])

and I use below expression in conditional show for those two fields to hide or show according to the user selection

=count(GetFieldSelections($Field)>0) and substringcount(concat($Field),"Vendor_Country")   --- for Vendor_Country

&

=count(GetFieldSelections($Field)>0) and substringcount(concat($Field),"Vendor")   ------   for Vendor

 

Could anyone please help where do I need to correct or add any expression so that only Vendor_Country alone displays in pivot when I select Vendor_Country in filter instead of displaying both fields

Labels (1)
1 Solution

Accepted Solutions
tajmohamed30
Creator III
Creator III
Author

getselectedcount($Field) > 0 and match($Field,'Vendor_Country')

getselectedcount($Field) > 0 and match($Field,'Vendor')

 

Finally found the solution after spending hours and by combining ideas from different forums 🙂

Thanks all, I hope this solution might help someone in future

View solution in original post

3 Replies
rubenmarin

Hi, thats because 'Vendor_Country' contains 'Vendor', try adding separators to limit values, something like:

substringcount('|'&concat($Field,'|')&'|','|Vendor_Country|')

substringcount('|'&concat($Field,'|')&'|','|Vendor|')

tajmohamed30
Creator III
Creator III
Author

getselectedcount($Field) > 0 and match($Field,'Vendor_Country')

getselectedcount($Field) > 0 and match($Field,'Vendor')

 

Finally found the solution after spending hours and by combining ideas from different forums 🙂

Thanks all, I hope this solution might help someone in future

tajmohamed30
Creator III
Creator III
Author

tried but haven't anyway found the solution thanks