Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
williamyuen96
Contributor
Contributor

Editing Class function

Hi guys, I ran problem where I succeed in implementing Class function into my ratings charts but the highest rating I have in the data set is 10. 

The syntax i used is as below 

=replace(class(Ratings,2),'<= x <', '-')

Capture.PNGHow do i edit this pie chart to ends at 8-10 instead ? Since the ratings in the data set is fixed at 10 as the highest

6 Replies
tresesco
MVP
MVP

Try putting a condition like:

=replace(class(if(Ratings<=10,Ratings),2),'<= x <', '-')

williamyuen96
Contributor
Contributor
Author

Does not work unfortunately

marcus_sommer

I think there is just the else-branch from the if-loop missing, just try it with:

=replace(class(if(Ratings<=10,Ratings, 10),2),'<= x <', '-')

- Marcus

williamyuen96
Contributor
Contributor
Author

Still doesn't work.. here, u could try it. I uploaded the qvf 

wcilliers
Partner Ambassador
Partner Ambassador

Try this...

 

=replace(class(if(Ratings=10,9.9,Ratings),2),'<= x <', '-')

wcilliers
Partner Ambassador
Partner Ambassador

=replace(class(if(Ratings=10,9.9,Ratings),2),'<= x <', '-')