Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

frequency distribution - calculated fields

 

Hello friends,

 

I have a field with numbers from 0 to 100 with 2 decimal places. I'm trying to create a calculated field where convert those numbers into 5 ranks. The expression may be (integer ("value" / 20)) * 10.

 

With this field I'll do a frequency distribution graph.

 

The problem is that there i'snt a function "integer" or "mod" on Sense for calculated fields.

 

Any idea?

 

Thanks in advance !!

 

8 Replies
swuehl
MVP
MVP

There should be a mod() function, and you can use floor() instead of integer.

Mod - script and chart function ‒ Qlik Sense

Floor - script and chart function ‒ Qlik Sense

swuehl
MVP
MVP

For example

LOAD

     value,

     Floor("value" / 20) * 10      AS ValueGroup

FROM ...;

Not applicable
Author

swuehl,tks for your answer, but I have 2 problems:

MOD and FLOOR are not working with a "calculated field" from UI.

For use the script, you must unlock automatic script, and I need it because I'm rokkie.

thanks again !

Michael_Tarallo
Employee
Employee

Hello Mariano,

Stefan has provided you with a expression that can also be used in the Master Items section for Dimensions and Measures that already has the data loaded - you should be able to create a new dimension (or measure) in the Master Items section with this expression without having to modify the load script. You can then use that in your visualization.

Check this video out: Using The Master Library (video)

You may also want to investigate the class() function to see if that will group the frequency as you need:

Check this video out: Qlik Sense in 60 - The Class() Function - YouTube

There are more videos in this series here: Qlik Sense in 60 - Playlist - YouTube

and.. videos on the entire platform here that will also help:

New to Qlik Sense Videos

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
swuehl
MVP
MVP

Not sure if I understand your issue with the calculated field.

Could you describe how you have created this field in the UI (maybe by posting screenshots)?

Not applicable
Author

Stefan, this is a screenshot. Sorry by the lenguaje. It´s spanish.

Michael_Tarallo
Employee
Employee

Hello Mariano,

That section you are referring to is in the data manager, calculated field, which in part uses the load script in which case the interface may not be aware of that function, hence the message you are getting.

Did you try creating this filed and using the mod() function in the Master Items as I stated above?

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
laxmanqlik
Creator II
Creator II

Hi Michael,

can you help me to get the data between the selected dates in sense.