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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Conditional Enabling Dimensions

Hi,

I have a issue with the Conditional Dimensions on the attached Document.

If I select the value "InvoiceDateBand" from the list box dim  the field InvoiceDate appears also on the table? I only want the dimension "InvoiceDateBand" to show only.

Any ideas?

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Try now

UPDATE: Made the following changes

=SubStringCount(Concat('|' & dim & '|', ','), '|InvoiceDateBand|')

View solution in original post

4 Replies
sunny_talwar

Try now

UPDATE: Made the following changes

=SubStringCount(Concat('|' & dim & '|', ','), '|InvoiceDateBand|')

alexpanjhc
Specialist
Specialist

It maybe a bug, but if you change 'InvoiceDateBand' to 'InvDateBand' you will be seeing what you want to see.

_Dimensions:

LOAD * INLINE [dim

ID

Product

InvoiceDate

InvDateBand

];

---do not forget to change the name in the chart too.

ivandrago
Creator II
Creator II
Author

Thanks Sunny T, any reason why my expression did not work?

sunny_talwar

I think the problem is that InvoiceDateBand include the SubString InvoiceDate and returns a SubStringCount of 1 even fore InvoiceDate dimension

Capture.PNG

In order to make sure that SubStringCount only gives a count for a complete fieldname match, I artificially added '|' around dim -> '|' & dim & '|' now the concatenated list will look like this -> |InvoiceDate|,|InvoiceDateBand|... and so forth and we are checking for matches with |InvoiceDate| or |InvoiceDateBand|. Here |InvoiceDate| is not a substring of |InvoiceDateBand|

Does this help?