6 Replies Latest reply: Oct 10, 2016 7:49 AM by Matheus Colares

# How to count the values?

I am new to QlikSense. I have following values –

 Values 5 35 14 4 19 45 22 24

I need your help in displaying the following table –

 Value Range Count 1 to 10 2 11 to 20 2 21 to 30 2 31 to 40 1 41 to 50 1

What's syntax to do this ? Need to display this in “Table” or “Text & Image”.

• ###### Re: How to count the values?

Check this link out:

Buckets

• ###### Re: How to count the values?

Dimension:

If(values>= 1 and values <= 10 , '1 to 10',

If(values>= 11 and values <= 20 , '11 to 20',

if(values>= 21 and values <= 30 , '21 to 30',

If(values>= 31 and values <= 40 , '31 to 40',

'41 to 50'))))

Then just you 'Count(values)'....

• ###### Re: How to count the values?

Hi,

Try this

*,

(Floor(Values/10) * 10)  & '-' & (Ceil(Values/10) * 10) AS Bucket

INLINE [

Values

5

35

14

4

19

45

22

24];

• ###### Re: How to count the values?

Now use

Bucket as dimension and count(Value) as expresison.

Regards,

Jagan.

• ###### Re: How to count the values?

You can use Class(Values,10) as a dimension and Count(Values) as a measure.