Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Purushothaman
Partner - Creator III
Partner - Creator III

Group Function

Hi Qlik Experts,

Request you to please help me to address these queries for the attached dataset

A) Create the following buckets for Discount:

    0-0.05

    0.06-0.1

    0.1-0.15

    0.16-0.25

 B) Show no. of Orders by Discount bucket for Order Priority = "Low". By default, this should show data for 2012

1 Solution

Accepted Solutions
Dalton_Ruer
Support
Support

Qlik provides a number of ways you can bucket data.

1. You can use the CLASS function https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/Scripting/Conditiona...

2. You can use a nested IF condition to check the values if even ranges aren't what you need

if(Interval("AUGDT" - "BUDAT", 'DD')<=30,'0-30 Days',
if(Interval("AUGDT" - "BUDAT", 'DD')<=60,'30-60 Days',
if(Interval("AUGDT" - "BUDAT", 'DD')<=90,'60-90 Days',
if(Interval("AUGDT" - "BUDAT", 'DD')<=180,'90-180 Days',
'180+')))) as [DSO Range],

Qlik uses a simple COUNT function that would count whatever primary key field name you want, and you would simply select the Order Priority = Low via a filter, and you would select 2012. 

If you wanted a KPI that was fixed to that calculation you would use what is called Set Analysis. I have created an entire hands on workshop you can read through to understand it. https://community.qlik.com/t5/Documents/Hands-on-Set-Analysis-from-the-ground-up/ta-p/1799118

Good luck on your test, job interview question. 

View solution in original post

1 Reply
Dalton_Ruer
Support
Support

Qlik provides a number of ways you can bucket data.

1. You can use the CLASS function https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/Scripting/Conditiona...

2. You can use a nested IF condition to check the values if even ranges aren't what you need

if(Interval("AUGDT" - "BUDAT", 'DD')<=30,'0-30 Days',
if(Interval("AUGDT" - "BUDAT", 'DD')<=60,'30-60 Days',
if(Interval("AUGDT" - "BUDAT", 'DD')<=90,'60-90 Days',
if(Interval("AUGDT" - "BUDAT", 'DD')<=180,'90-180 Days',
'180+')))) as [DSO Range],

Qlik uses a simple COUNT function that would count whatever primary key field name you want, and you would simply select the Order Priority = Low via a filter, and you would select 2012. 

If you wanted a KPI that was fixed to that calculation you would use what is called Set Analysis. I have created an entire hands on workshop you can read through to understand it. https://community.qlik.com/t5/Documents/Hands-on-Set-Analysis-from-the-ground-up/ta-p/1799118

Good luck on your test, job interview question.