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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remove a dimension accordingly to a selection

Hi all,

Is it possible to remove/change a dimension in correspondence with a selection?

for example, there are 3 types of data, A, B and C.

I want to lay data B out differently than A and C.

So if you were to select A or C- the dimensions of the table box would be Meter, Date and Time
whereas selecting B the dimensions would be Meter, Date, Total

Thanks in advance,
McKay99

4 Replies
Not applicable
Author

You can use calculated dimensions. Use such a dimension to check on the selection of the type and change things accordingly.

In your case you only need a calculated dimension for the third dimension and make it switch between Time and Total.

A very simple solution:

=if(type = 'A' or type ='C',Time, Total) --> show the value in field Time or field Total depending on the Type selection

and for the title of the dimension:

=if(type = 'A' or type ='C','Time', 'Total') --> show text 'Time' or text 'Total' depending on the Type selection

Hope this answers your question

Not applicable
Author

Thanks for the reply, it's quite helpful, although I was incorrect in saying that Total was a dimension, it is in fact an expression.

Is it still possible to do this or should I try to change the expression into a dimension?

Not applicable
Author

sorry for this but what do you mean the title of the dimension? I've added my calculated dimension but I don't understand what you mean by title. Are you talking about the label name?

Not applicable
Author

Yes, I mean the label. Sorry for the confusion.