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

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

How-to applymap() a calculated expression to a desc. field

Hi folks,

Referring to the title above, would anyone know how I can go about doing this?

The situation that I am facing is as such, 1 dim --> UserID, has a time-stamp associated with it (whenever the user uses the service, a time-stamp is generated). I am calculating an expression based on the MAX(DATE) - MIN(DATE) to find out the range of days he/she has been actively using the service. Once that expression has been computed, am going to compute another expression -- having an if(MAX(DATE) - MIN(DATE) <= 90, '1-3 Months', ...) naming it [ActiveMths_GROUP].

Now that is done, I would like to GROUP the number of users based on the previously calculated expression --> [ActiveMths_GROUP]I have been trying a few methods, even using applymap() in an expression, but have failed terribly.

Please help!. Thanks in advance. Much appreciated.

Best Regards,

R

1 Solution

Accepted Solutions
preminqlik
Specialist II
Specialist II

hi once try this

Use the following in calculated dimension

if(aggr(max(Date)-min(Date),USERID)<=90,'0-90',

if(aggr(max(Date)-min(Date),USERID)>90 and aggr(max(Date)-min(Date),USERID)<=180,'90-180'))      

View solution in original post

4 Replies
preminqlik
Specialist II
Specialist II

Use [Active Months_Group] as a calculated dimension

Not applicable
Author

Hi Prem,

In the same table? I don't think that's possible.

preminqlik
Specialist II
Specialist II

hi once try this

Use the following in calculated dimension

if(aggr(max(Date)-min(Date),USERID)<=90,'0-90',

if(aggr(max(Date)-min(Date),USERID)>90 and aggr(max(Date)-min(Date),USERID)<=180,'90-180'))      

Not applicable
Author

Thanks mate.