Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
karan_kn
Creator II
Creator II

Count Values by number

How to calculate the count of numeric value.  Please refer the screenshot for understanding, also attached source data

count.JPG

 
Labels (1)
1 Solution

Accepted Solutions
JGMDataAnalysis
Creator III
Creator III

Something like this?

Test:
NOCONCATENATE 
LOAD *, Value AS Values
INLINE [
    Month, ID,   Value
    Feb,   8721, 1
    Feb,   5962, 1
    Feb,   7708, 2
    Feb,   6075, 2
    Feb,   6780, 2
    Feb,   7795, 3
    Feb,   7833, 4
    Feb,   6561, 4
    Feb,   9093, 5
    Feb,   8653, 5
    Feb,   6127, 6
    Feb,   7424, 6
    Feb,   9282, 6
    Feb,   7248, 7
    Feb,   7473, 9
    Feb,   9795, 13
    Feb,   8407, 13
    Feb,   7521, 15
    Feb,   8749, 24
    Feb,   8562, 28
    Feb,   6110, 37
    Feb,   6872, 54
    Feb,   6006, 54
    Feb,   7943, 114
    Feb,   7611, 455
];

Values:
NOCONCATENATE
LOAD MinValue + IterNo() AS Values
WHILE 
	MinValue + IterNo() <= MaxValue
;
LOAD 
	0 AS MinValue,
    Max(FieldValue('Value', RecNo())) AS MaxValue
AUTOGENERATE FieldValueCount('Value');

QlikCommunityChallenge_Count.PNG

View solution in original post

1 Reply
JGMDataAnalysis
Creator III
Creator III

Something like this?

Test:
NOCONCATENATE 
LOAD *, Value AS Values
INLINE [
    Month, ID,   Value
    Feb,   8721, 1
    Feb,   5962, 1
    Feb,   7708, 2
    Feb,   6075, 2
    Feb,   6780, 2
    Feb,   7795, 3
    Feb,   7833, 4
    Feb,   6561, 4
    Feb,   9093, 5
    Feb,   8653, 5
    Feb,   6127, 6
    Feb,   7424, 6
    Feb,   9282, 6
    Feb,   7248, 7
    Feb,   7473, 9
    Feb,   9795, 13
    Feb,   8407, 13
    Feb,   7521, 15
    Feb,   8749, 24
    Feb,   8562, 28
    Feb,   6110, 37
    Feb,   6872, 54
    Feb,   6006, 54
    Feb,   7943, 114
    Feb,   7611, 455
];

Values:
NOCONCATENATE
LOAD MinValue + IterNo() AS Values
WHILE 
	MinValue + IterNo() <= MaxValue
;
LOAD 
	0 AS MinValue,
    Max(FieldValue('Value', RecNo())) AS MaxValue
AUTOGENERATE FieldValueCount('Value');

QlikCommunityChallenge_Count.PNG