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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in Calculated Dimension

Hi all,

I need to use the following expression as a Calculated Dimension:

=FirstSortedValue( aggr(sum(stkh_movement_quantity),stkh_product,stkh_movement_date), -aggr(stkh_movement_date,stkh_product,stkh_movement_date)))

The aim is to give only the most recent movement quantity, based on the latest movement date. It works fine as an expression, however when used as a Dimension I get the //Error in Calculated Dimension. Any ideas where I'm going wrong?

Many thanks for any help.

10 Replies
Not applicable
Author

Hey guys, 

I am given a task to calculate the frequency of calls across a territory. If the rep called a physician regarding the sale of the product 5 times, then frequency is 5 and HCP count is 1....I generated frequencies from 1 to 124 in my pivot table using a calculated dimension which is working fine. But my concern is :

My manager wants frequencies till 19 in order from 1..2..3..4...5..6.....19...

And from the frequency 21-124 as 20+.

I would be grateful if someone helps me with this.....Eager for the reply....