Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Using a data field as "Fractile" in a Calculation

Hello All!

Still in learning mode for QlikView and I am stumped.

I am looking to build a legend to go with my QlikMaps heat map of the continental US.  I am using the QlikMaps default of creating 10 percentiles and coloring the states into one of those 10 values.

I want my legend to show the upper boundary of the percentile along with the percentile (i.e. 10th, 20th, etc.) and the corresponding color.

I have loaded an inline table with the colors for the percentiles.  If we want to change the granularity of the percentiles and colors, I would like to just change this inline table and not the visuals.

Unfortunately, I cannot get a dynamic calulation of the Percentile working and need to "hardcode" the percentiles and display with an IF statement.  When I try the same basic calculation with a column value as opposed to a hard coded number in the "percentile" spot of the formula, i get a "-" as the answer.

I may be making a rookie mistake, but famous last words "it looks like it should work"

Tags (2)
2 Replies
Employee
Employee

Re: Using a data field as "Fractile" in a Calculation

it won't work because percentilelabel is in a data island and unlinked to the numeric value you are looking to get a fractile on. It will only work for the hardcoded long IF statement that you laid out.

The thread below may help, the same thing is done in one of the charts, but the difference is that the percentile field is in a table that is linked to a table in the data model that has the raw values (population in your case).  You could calculate the fractile values in the load script  and join a field that keeps the fractile number (1->10) to an inline color table with the same numbers and the associated colors ...which will dynamically pick up the color.

Fractile use?

Not applicable

Re: Using a data field as "Fractile" in a Calculation

Thanks Jonathan,

I will have to spend more time looking at the example.  It certainly seems like it could be adapted to this.  Will be a good challenge for a newbie