Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

using class function

Hello

got a fact table that contains the defects reported by clients by date

I want to classify these clients for each release by brackets of number of defects reported by them

please advise on how to use Class function to get 3 brackets [0,5],[6,10],[11,...[

I can walk on water when it freezes
2 Replies
PradeepReddy
Specialist II
Specialist II

Generally...

Class( var,5 ) with var=7, will give the result --->  5<=x<10

To convert this into brackets

'['&Subfield(Class(7,5 ) ,'<',1)&','&num(Subfield(Class(7,5 ) ,'<',3)-1)&']' will give the result as [5,9]


so you will get the result as.. [0,4],[5,9],[10,14].....


ali_hijazi
Partner - Master II
Partner - Master II
Author

ok but I want to restrict brackets to only 3

but this way I need to calculate the count of defects by client in the script no?

I can walk on water when it freezes