Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Don't miss the upcoming Q&A with Qlik session on Qlik Application Automation on November 16th! REGISTER NOW
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)
  • logic

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 . 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

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 . 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

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') ) )