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: 
Not applicable

Expression error?

Hi,

I have dimension and expression as below in straight table

Dimension: TeamMember

Expression: Count(DISTINCT {$<Source={'ITDepartment'},Order={ITDepartment'},Result={'Work Completed'},Flag={1}>}EmployeeID)

when I select the Date from 03/03/2014 to 07/03/2014 the count of the expression is showing 10 whereas in the database the count is showing 5. can anynone please tell me is there anything wrong in expression?

Thanks.

38 Replies
sudeepkm
Specialist III
Specialist III

I see there is a single quote missing in the below expression: Order={ITDepartment'}

Can you please verify it? Or please post a sample QVW.

Expression: Count(DISTINCT {$<Source={'ITDepartment'},Order={ITDepartment'},Result={'Work Completed'},Flag={1}>}EmployeeID)

Not applicable
Author

Thanks. sorry it is a typo mistake. in the file i haven't missed anything.

MK_QSL
MVP
MVP

Count({$<

               Source = {'ITDepartment'},

               Order = {'ITDepartment'},

               Result = {'Work Completed'},

               Flag = {1}

          >}DISTINCT EmployeeID)


I don't think so this will affect your end result. But try it at least once.

OK... let us have your sample apps.

er_mohit
Master II
Master II

Try to change expression like this

make sure Date Format is same .

Count( {$<DateField={'>=$(=Date(Min(Datefield)))<=$(=Date(Max(Datefield)))'},Source={'ITDepartment'},Order={ITDepartment'},Result={'Work Completed'},Flag={1}>}EmployeeID)

sudeepkm
Specialist III
Specialist III

That's strange because if you are saying that in your database table the count returns 5 EMP IDs and in QlikView even after you do distinct the count is 10.

I think it would be easy if you can post the QVW. The expression looks fine to me. I need to know how the table is created in QlikView after you loaded it from DB.

Not applicable
Author

Please see attached as this is sample data.so, it is showing 5. but actually in my original file it is showing 10

Not applicable
Author

HI

Count(DISTINCT {$<Date={">=$(=min(Date))<=$(=max(Date))"}Source={'ITDepartment'},Order={ITDepartment'},Result={'Work Completed'},Flag={1}>}EmployeeID)

Not applicable
Author

Thanks and it's not working. Any help

Not applicable
Author

Thanks. same it's not working