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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a table having built in condition.

I have a table having the columns Name, Department , Salary and sex.

I want to build and show a table for all male employees. The table should have name, department and salary and should display only values where sex='m' by default.

Any help would be appreciated. Thanks

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a straight table with name and department as dimensions and as expression sum({<sex={'m'}>}salary). Make sure to use the correct case sensitive field names.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you the reply Gysbert. I figured that out. I am however looking for a way to show it without any expression which kinda rules the straight table out.

bgerchikov
Partner - Creator III
Partner - Creator III

Hi Ravi,

You need this condition somewhere in the chart or another option is to set a trigger on opening to assign "m" to field sex.

In chart you can set this condition in expression set analysis or in dimension:

if(sex='m', Dimension_Field,null())

Hope it will help

Colin-Albert
Partner - Champion
Partner - Champion

If you want to do it without an expression, then add a listbox for the field sex alongside your chart.

Click on m and your chart will show the data for males.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Ok, try alternates states then. Create a new alternate state. Create your table box. Assign the table box to the new alternate state. Select the value 'm'. Right click the column and choose Lock.


talk is cheap, supply exceeds demand