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

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

MySQL to Qlikview Expression translation

I've ran into a problem while writing some expressions, based on some MySQL queries, in a pivot table in QlikView. The results between the said query and the expression is completely different for most of the users but not for all.

The query is:

SELECT distinct date(initiated_date) FROM activities

where deleted = 0

and activity_type_id != 8

The expression is: Count({<activity_type_id -= {'8'}>} distinct initiated_date)

I'm counting the query results' rows for different users,users that I'm using as dimension in the pivot table. For some users the results match(the number of rows resulted in the query equals the result of the Count expression that I'm using in the pivot table) but for others it doesn't.

Why? Am I missing something regarding the count expression ? If so, how should I write the expression?

10 Replies
sunny_talwar

May be this

Dimension

User

Date(Floor(initiated_date)) -> Calculated dimension

Expression

Count(DISTINCT initiated_date)

This is useful assuming initiated_date is a timestamp... else all you will get is 1 for each row