Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a "Basket"

Hi Everyone,

I am trying to create a type of a basket.

I Have attached a basic example of what I'm trying to do.

I Have to create a dimension in a straight table that says, '>2' or '>5' or '>10'.

You will see in the chart is says '>2' and a total of 45, but if I understand correctly, it is only because all of the Amounts are bigger than '2'. I Need  '>2' or '>5' or '>10' instead of only '>2'.

I Am quite new to QlikView and would appreciate help ASAP.

Thanks in Advance

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

10 Replies
tresesco
MVP
MVP


PFA

Gysbert_Wassenaar

Try:

=IF(Amount >= 10 , '>= 10',

IF(Amount >=5, '>= 5',

IF(Amount >=2, '>= 2')))

You need to start with the most restricting clause first, i.e. with >=10 and work down to the least restricting.


talk is cheap, supply exceeds demand
Not applicable
Author

PFA??

Hi G,

I might have not explained what i want good enough.

The end Product must give me the totals Between for example 1-5 and then between 6-12.

Not applicable
Author

try this

in script

if(amount>2,field) as [>2],

if(amount>5,field) as [>5],

if(amount>10,field) as [>10],

*********************************

then in dimension

if([>2]>2,'>2 or >5 or >10 ', if([>5]>5, '>5 or >10' , if([>10]>10,'>10')))

Not applicable
Author

Hi Tresesco, 

My answer should look like this.

>2 = 45

>4 = 36

>6 = 30

>8 = 22

>10 = 12

Please advise

Not applicable
Author

Hi Vishwaranjan,

This is cool and can work, but i would like to do it in the Front-End only.

I do not want to use script for this one.

Any Ideas?

Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks G,

This is 100% what I need.

Gysbert_Wassenaar

If you want that calculation for every Amount value you can use Amount as dimension and this expression: rangesum(below( sum(Amount),0,FieldValueCount('Amount')))


talk is cheap, supply exceeds demand