Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Use of Calculated Dimension in Expression

Dear Qlik Community,

I would expect that the below Expression would return 58.072. Instead it takes the entire count of 63.338.

Count( {$<[PO creation time]={'a. same day'}>} [PurchDoc] )

I believe this is the result of the Calculated Dimension [PO creation time] which is used in the Expression.

Is there a way to handle this?

P.S. see attached print screens for more information.

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Only physical field names can be used on the LHS of a set expression. So this expression will be ignored giving you the entire count. The simplest workaround is to use an If

=Count(If([PO creation time] = 'a. same day', PurchDoc))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hi Jonathan,

When using your expression an error pops up: Bad field name: [PO creation time].Bad field name.jpg

Anonymous
Not applicable
Author

Hi Jonathan,

FYI. I've added a Sample file. This might be useful to play around with the Expression.

tyember1
Contributor III
Contributor III

Try adding a DISTINCT after the count. 

Saranyat
Contributor II
Contributor II

Hope this helps you thanks

=Count({ $<[C_PO creation time]={'<=0'}>} [PurchDoc] )

 

clipboard_image_0.png