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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

condition on the dimension field in a table

Hi All,

I have a table as follows:

IDEmp IDEmp NameSales
11000John100
21001Peter
31002Mark
41000John
51001Peter1000
61002Mark1000
71000John500

I want to create a table which will display only the 'Emp Name' which has a value in the field 'Sales'. Basically i want the output as follows:

Emp NameSales
John100
Peter1000
Mark1000
John500

Your help is much appreciated. Thanks.

12 Replies
Not applicable
Author

I may not be able to post my script. But my Department and Employee_Sales tables are as follows:

Department IDDepartment Name
Region
1SalesNA
2EngineeringSA
3MarketingNA
4AdminSA
5HRNA
6OperationsSA
7ITNA
IDEmployee IDEmp NameDepartment IDSales
110000John1100
210001Peter1
310002Mark1100
410003Jack2100
510004Mary3300
610005Irina4200
710006Amy4200
810007Rich5
910008James6500
1010009Pierre7600
1110010Shaun7100
1210011Susan7

I want the straight table to display data of only those employees who belong to the department of region 'NA' and have data in the 'Sales' field. My output should be as follows:

Department NameEmployee NameSales
SalesJohn100
SalesMark100
MarketingMary300
ITPierre600
ITSusan100

This is the exact problem statement. Your help is much appreciated, Thanks.

ankitaag
Partner - Creator III
Partner - Creator III

Hi Ramya,

Please write your calculated dimension as

=if(Region='NA',[Department Name])

and check the suppress null value box.

suppress.PNG

The result will be

result.PNG

For more reference pfa the application.

Thanks and Regards,

Ankita

jonathandienst
Partner - Champion III
Partner - Champion III

Create the straight table like this:

Dimensions: Department Name, Employee Name

Expression: Sum({<Region = {'NA'}>} Sales)

Make sure suppress zeroes is checked

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein