Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
w0jt4z
Contributor III
Contributor III

Show if Column problem

Hi Guys, I tried to pin it to another post, but i hadn't answer. I have a little problem.

I created Dimension Table. Looks like:
Dimensions:
CrossTable(DimensionType,DimensionValue)
Load * Inline [
DimensionIndex, DimensionName, DimensionCode
1, Imię i nazwisko, PassengerName
2, Numer biletu, TicketNumber

This table I have on my filter pane. In my table every column has function in "Show column if" section:
(concat(DimensionIndex=1)) AND GetSelectedCount(DimensionValue)>0. It works, but only with 14 any dimensions. When I select 15 Dimension it shows all of columns. Anybody knows why?

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

Hi 

if you use this expression :

=if(index('|' & concat(distinct DimensionIndex,'|') & '|','|2|')>0 AND GetSelectedCount(DimensionValue)>0,1,0)

it's works for any number of dimensions 

View solution in original post

6 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

can you share an app with sample data 
it's hard to understand the issue from your description 

w0jt4z
Contributor III
Contributor III
Author

Of course. I tried to duplicate my problem in the test app, but  here looks it's ok. Maybe it is problem with many Dimensions?
I attach my app and simplified data model. 
I have data, i have attributes and "dimensions". Dimensions is for choosing which column should be on the table. What could I do wrong? The important thing is never mind which column I select, it is always >15 then show all columns.

lironbaram
Partner - Master III
Partner - Master III

Hi 

if you use this expression :

=if(index('|' & concat(distinct DimensionIndex,'|') & '|','|2|')>0 AND GetSelectedCount(DimensionValue)>0,1,0)

it's works for any number of dimensions 

w0jt4z
Contributor III
Contributor III
Author

Thank You for solution, I'll try it, but I don't fully understand it. Why should I use '|' in my expression?
And I understand, "& '|','|2|')>0 " - the number 2 is number of my index?

lironbaram
Partner - Master III
Partner - Master III

hi 

the pipe symbol is for that i'll know the separator

i look for '|2|' to be sure its a the right value , if i looked for 2 than if you had dimension 12 or 20 dimension 2 will also appear  

w0jt4z
Contributor III
Contributor III
Author

I didn't know that, thank You very much for Your help! 🙂

Best Regards,
Wojtek