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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
BrianDH
Creator II
Creator II

Count by Age

0-23162
3-51748
6-101295
11-14501
15+962

this is what i am trying to do.

if aging >=0 and aging <= 2 then count ( distinct ReportID)

if aging >=3 and aging <= 5 then count ( distinct ReportID)

two questions: what object should I use and how is the best way to do this?

 

Thanks

B

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

I would probably go for a bar chart to visualise this. If you are to solve this issue front end only, then you will need to do nested if statement to solve this.

If( aging>=15, '15+',

  If( aging<15, '11-14',

    If( aging<11, '6-10', '<5') ) )

If you are allowed to work with the script then I would recommend you to look into intervalmatch to solve it . 

View solution in original post

3 Replies
Vegar
MVP
MVP

I would probably go for a bar chart to visualise this. If you are to solve this issue front end only, then you will need to do nested if statement to solve this.

If( aging>=15, '15+',

  If( aging<15, '11-14',

    If( aging<11, '6-10', '<5') ) )

If you are allowed to work with the script then I would recommend you to look into intervalmatch to solve it . 

BrianDH
Creator II
Creator II
Author

where do I place the Distinct Count ReportID

BrianDH
Creator II
Creator II
Author

Got it thanks!!

I used a table.  It is what they wanted.

For values:

If(AGING>=15, count(distinct REPORTID),

If(AGING<15, count(distinct REPORTID),

If(AGING<11, '6-10', count(distinct REPORTID)) ) )

For Labels:

=If(AGING>=15, '15+',

If(AGING<15, '11-14',

If(AGING<11, '6-10', '<5') ) )