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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MAX ISSUE

I have a data which includes Policynum and Module. When the policy renewes it is assigned a new mod .

for example Policynum '123456' CAN HAVE MODULES 01,02,03 and 04

I am trying to pick the latest combination of policy and module

so  for above policynum I wanna see only Policynm'123456' and module '04'.

How can I do that

Labels (1)
19 Replies
sunny_talwar
MVP
MVP

I guess, create a straight table with Policynum as your dimension and Max(module) as your expression.

Mark_Little
Luminary
Luminary

In Script

Load

     Policynum,

     MAX(Module) AS MaxModule

Resident Yourtable

Group BY Policynum;

In a chart table

Dimension Policynum

Expression Max(Module)

Mark

Not applicable
Author

In a chart table

Dimension Policynum

Expression Max(Module)


I did the above already what happens is that it works only If I have a policy num selected in the list box.  If I dont select any policy num then there is no data

Mark_Little
Luminary
Luminary

Hi,

That seems odd as it should be fine, and as long as there are no duplicates should return the required values.

Try Max(DISTINCT Module) rule out duplicates.

Mark

Not applicable
Author

Max(DISTINCT Module) same result

Not applicable
Author

Thats exactly what I did but  what happens is that it works only If I have a policy num selected in the list box.  If I dont select any policy num then there is no data

sunny_talwar
MVP
MVP

Would you be able to share a screenshot or a sample to show what exactly is going on?

Mark_Little
Luminary
Luminary

Can you supply some more information?

Is this information on one table?

Is the module always a numeric value? - Try wrapped in the Num() function.

If you just created a table Policyno and Module, what do you see?

Mark

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Are the possible modules for a single policy listed in a string (like '01, 02, 03, 04') or are they available as separate field values?