Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
clarachac
Contributor III
Contributor III

Format a table depending on a filter

Hello,

I have multiple excel sheets with approximately the same data but for different subjects.
Excel Sheet 1 : A1:Subject ; A2:Agriculture
Excel Sheet 2 : A1:Subject ; A2:Cars Industry

I want to create a table in qliksense where the columns change depending on the choice of the subject in a filter.

Labels (5)
1 Solution

Accepted Solutions
Clement15
Creator III
Creator III

I understand, in this case would the use of a Variable Input be possible? You select the field you want in your list, the variable changes value to take its name and you call this variable as a measure or dimension in your table

View solution in original post

5 Replies
Clement15
Creator III
Creator III

Hello,
With the 'show column if' option, you can create a button modifying the value of a variable allowing you to show or hide the columns as you wish.

clarachac
Contributor III
Contributor III
Author

I can have 10 different subjects, if I use the 'show column if' I'll have too many dimensions, and each time I add a new subject I will have to modify the visualization.

I want to have an easy configurable table, without having to edit the table code if possible.

Clement15
Creator III
Creator III

I understand, in this case would the use of a Variable Input be possible? You select the field you want in your list, the variable changes value to take its name and you call this variable as a measure or dimension in your table

LRuCelver
Partner - Creator III
Partner - Creator III

There are many ways you can do this. You have to make a few design decisions:

  1. How to select the subject
    • You can store the current subject in a variable and use e.g. a dropdown in a variable selector to change the subject. This way you are limited to a single subject at a time.
    • You can have a field for the subjects. If you always want a single subject to be selected, you can enable the "Always one selected value" in the field settings. Having the subject as a field also allows you to select multiple subjects, but for that your expressions will need to be a bit more complicated.
  2. How to change what is shown in charts
    • You can check the subject variable/field selections and enable or disable dimensions and measures according to the subject/s selected using the calculation conditions.
      • An extreme form of this would be having individual sheets for every subject and only showing the one for the subject selected.
    • You can write all different options in one expression and select which one is used based on e.g. a variable using an If() or Pick() function.
    • If your expressions share a lot in common with all subjects, you can use the selected subject variable/field to dynamically change, what e.g. fields are used in an expression.
marcus_sommer

Why should the columns change if they contain the same data? Just loading everything in a single table and adding one or two source-fields to track the Excel file/sheet information would be enough to differentiate the data in dimensions and/or selections and/or conditions.