Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
SGrijalba
Contributor II
Contributor II

Pick Function

Hi everyone!.

I have some doubts about the "pick" function in chart expression.

in my model i've created an inline table named Rank_Ingresos:

Rank_Ingresos:
load * inline[
Key_Ingresos, Rango_Ingresos
1, Menor a 2MM
2, 2 a 5MM
3, 5 a 10MM
4, Más de 10MM
];

the context is:

if Rango_Ingresos < 2.000.000 then 'Menor a 2MM'

if Rango_Ingresos between 2.000.000 and 5.000.000 then '2 a 5MM'

if Rango_Ingresos between 5.000.000 and 10.000.000 then '5 a 10MM'

if Rango_Ingresos > 10.000.000 then 'Más de 10MM'

"Rango_Ingresos" its like a "Rank_Sales"

"Total_ Ingresos" its like a "sum of sales"

Im trying to put the count of [Key_Cliente] (its like the ID) for measure the quantity of "rent modules" that they have per "rank_sales", and "sales" per rank,

i need to build a table like this:

SGrijalba_8-1702393428560.png

 

1.-: I've tried to put manual values into the table and it works fine:

SGrijalba_2-1702391683584.png

2.- when i've uncomment the first line and comment the "1", works fine to:

SGrijalba_4-1702391967501.png

3.- but when i tried to put 2 expressions it doesnt work and the 2nd range dissapear:

 

SGrijalba_6-1702392666646.png

 

4.- but when i do a basic sum and comment the line it works fine:

SGrijalba_7-1702392788798.png

 

is there something that im missing?

i hope anybody can help me, and if someone need more information for this case, let me know.

Regards! and sorry for my bad english!

Stefan Grijalba.

 

Labels (3)
6 Replies
steeefan
Luminary
Luminary

If the row disappears, it suggests that the value of the expression is 0. Those are usually not shown. Is the expression working on its own in a different object?

SGrijalba
Contributor II
Contributor II
Author

Hi Stefan!

thanks for your fast reply!

asking your question, yes!, it works, i've created separated kpi for each rank:

SGrijalba_0-1702394604342.png

but when i do this in the table it doesnt work:

SGrijalba_1-1702394743104.png

 

as you can see, each rank has data, so,  i dont understand what im missing.

Regards!.

steeefan
Luminary
Luminary

Sorry, can't think of anything else right now. If you manually put 0 for the values, you will see all rows disappearing. You can deactivate that functionality here:

steeefan_0-1702395656567.png

I know that this doesn't help you, it's just to illustrate that the result of the expression is indeed 0 (or NULL).

SGrijalba
Contributor II
Contributor II
Author

I just unmark that option and it shows the 0 values, but i dont understand why qlik view cant show the values for each rank, but if i put a basic sum it works.

SGrijalba_0-1702396566920.png

im trapped in this case! =(

 

SGrijalba
Contributor II
Contributor II
Author

Any idea how to resolve this?

thanks!

steeefan
Luminary
Luminary

Would be good if you could supply the data or the QVW/QVF file. Otherwise I cannot reproduce your current situation.