Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
tomtastic
Contributor II
Contributor II

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
tomtastic
Contributor II
Contributor II
Author

Hi Jonathan,

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

tomtastic
Contributor II
Contributor II
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