Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Grouping Over Values (Cutoff Values)

Hi Guys,

I have one report , customer wise outstanding..

so if i have 100 customers than all may have outstanding amount, more or less..

what i want is below a particular cutoff value i want to see the grouping.

Say below 50000 the customer outstanding amount should show as total else above 50000 should show as line item wise

say input  like this

 

CustValue
a60000
b65000
c 70000
d100000
e51000
f10000
r5000
g20000
t15000
y10000

Output shud be like this

 

CustValue
a60000
b65000
c 70000
d100000
e51000
Below 50000 Customers60000

Hope i m clear with output i required

Regards

Abhay

5 Replies
Not applicable

Hi Abhay

I used the following expression to create a calculated dimension. The expression will create the new 'bucket' you want to create for customers below 50000

=if(aggr(sum(Value),Cust) > 50000, Cust, 'Below 50000 Customers')

ajsjoshua
Specialist
Specialist

Hi,

PFA

choose cust and see their cutoff(grade)

Not applicable

Try like below,

Load

*,

if(Value<50000,'Below 50000',Cust) as Customer

resident (Main Source table);

Kushal_Chawda

Data:

LOAD  Cust,

            Sum(Value) as Value

FROM Table

Group by Cust;

New:

noconcatenate

LOAD Cust,

          Value

Resident Data

where Value>50000;

Concatenate(New)

LOAD 'Below 50000' as Cust,

           sum(Value) as Value

Resident Data

where Value<50000;

Drop table Data;

If you have Other columns As well, link this table to original Table on Cust

sunny_talwar

Or this for a way to let the limit being decided on a front end using user input

Data:

LOAD Cust,

    Value

FROM

[https://community.qlik.com/thread/215013]

(html, codepage is 1252, embedded labels, table is @1);

New:

NoConcatenate

LOAD Cust,

    Value

Resident Data

where Value > $(vLimit);

Concatenate(New)

LOAD 'Below ' & $(vLimit) as Cust,

    Sum(Value) as Value

Resident Data

where Value < $(vLimit);

DROP table Data;