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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

where clause on a specific field?

Is it possible to use a where clause on just a certain field?

Load Company,

ID,

Name,

Value where Name = 'Bob'

From ....

Something like the above, where the where clause is before the from clause. The script editor is underlining it in red, but is there a way to do this?

12 Replies
its_anandrjs
Champion III
Champion III

Try with this code

Aggregate_Data:

Load AlphaProdID,detail_type,


Count(so_id) / Count(DISTINCT so_id) as LinesPerOrder,

Count(so_id) / Count(DISTINCT SO_detail_created_by) as LinesPerUser,

Count(Distinct so_id) / count(DISTINCT SO_detail_created_by) as OrdersPerUser,

If(detail_type = 'CM', count(so_id)) as CM_count


count( If(detail_type = 'CM', so_id ) ) as CM_count

Resident Sales_Order

Group by AlphaProdID,detail_type;

Regards

Anand

Not applicable
Author

Trying to get the percent of so_id that has CM, so I tried this but it doesn't work

Load AlphaProdID,

detail_type,

count( If(detail_type = 'CM', so_id ) )/count(so_id) as CM_count

Resident Sales_Order

Group by AlphaProdID, detail_type;

Any ideas?

vishsaggi
Champion III
Champion III

Can you share a sample if possible with some sample data?