# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Buckets

HI,

I need to create some price buckets in Qlik Sense

taking this format of example data

 SKU RRP Sum([Sold GBP]) Sum([Sold Qty]) GAKJ06A013 30 £3,510.00 233 ML3498A018 30 £1,984.17 233 YD000808018 40 £9,300.00 233 YK000018181 50 £10,150.00 232 YT000712027 25 £4,384.00 231 YT000838125 30 £4,186.38 231

Would like to bucket into groups of MD percentages

70%+

50-69% MD

30-49% MD

10-29% MD

Full Price

I tried some nested ifs and read about the Class function but not sure how to use as I'm comparing (Sold GBP / Sold Qty) with the RRP

1 Solution

Accepted Solutions
Honored Contributor II

## Re: Buckets

Correct me if I'm wrong but I hope this is what you are looking for?

Note: I removed Currency Symbol from GBP so that I can create a new field ASP.

You can use Subfield too to remove pound symbol.

4 Replies
Honored Contributor II

## Re: Buckets

whats the definition behind these

70%+

50-69% MD

30-49% MD

10-29% MD

Full Price

how to determine if it is 70%+ and other %'s.... ? comparing it with what value?

New Contributor III

## Re: Buckets

Hi Shahbaz

thanks for the help

(Sold GBP / Sold Qty)
Get the Average Sale Price (ASP) e.g for

SKU GAKJ06A013   £3,510 / 233 = 15.06

then

(RRP - ASP) /RRP

30 - 15.06 / 30 = 0.498 so 49.8%

Which is the 30-49% MD bucket

Honored Contributor II

## Re: Buckets

Correct me if I'm wrong but I hope this is what you are looking for?

Note: I removed Currency Symbol from GBP so that I can create a new field ASP.

You can use Subfield too to remove pound symbol.

New Contributor III

## Re: Buckets

Thanks for the help Shahbaz, that's perfect