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

Dont see Variable result unless i select a row

I everybody,

Today i have spécial problem with qlikview, i explain :

i add fews variables in my qvw, and i use one as expression in a straight table, but the problem is that i see the result of the ''Variable'' only when i Select a row.

To summarize, i have a two columns straight table i have i have allways "0" in my second columns( who containt my variable) unless i select one row of the table

Somebody have a solution??

Thanks

12 Replies
swuehl
MVP
MVP

What's the definition of your variable? And which dimensions are used in your chart?

Not applicable
Author

here is the definition of my variable :

if($(#DSnbD)='Oui','Oui',if($(#DSCB)='Oui','Oui',if($(#DSEND)='Oui','Oui',if($(#DSnbD)='Non' and  $(#DSCB)='Non' and $(#DSEND)='Non','Non',if($(#DSnbD)='NC','Non')))))

and my dimension is just i field of my excel files, and for each dimension i need the result of my varible. But it's allways "0" unless i select one row

swuehl
MVP
MVP

It's hard to help you without knowing the field names used as dimensions and the definition of the variables used in your above expression.

It may be easier if you upload your sample QVW to this thread (upload is available in advanced editor).

In general, each field in your expression should be either embedded in an aggregation function, or should be a field used in a dimension. If there's no unambiguous evaluation of the expression, it will return NULL (not zero, and I currenctly don't understand why your above expression should return zero).

Not applicable
Author

Thanks you very much for your helps,

Here is my straight table the field ''EEEE'' is the one who containt my variable and it allways show zero before i selcted a row

Capture2.PNG

now what happen when i selelect a row i get the result on field ''EEEE'' like u can see :

and the ''EEEE' containt my variable :

Capture.PNG

i would like to share the qvw with you but my company wnt all confidencial, hope u w'ill understand. Thanks a lot ;

swuehl
MVP
MVP

Yes, I understand that you can't upload your original QVW.

But I still understand how your expression you posted above:

if($(#DSnbD)='Oui','Oui',if($(#DSCB)='Oui','Oui',if($(#DSEND)='Oui','Oui',if($(#DSnbD)='Non' and  $(#DSCB)='Non' and $(#DSEND)='Non','Non',if($(#DSnbD)='NC','Non')))))


should return zero or 1. I may miss something, but possible return values are 'Oui' or 'Non', right?

Not applicable
Author

in fact my variable depend on other variable and the result is the number of ''Oui'' of a other variable, you understand more now?

swuehl
MVP
MVP

Ok, so there is probably a COUNT() function involved somewhere.

As I said it's almost impossible to help without a minimum if information provided.

I would assume that you evaluate fields not embedded in an aggregation function and that this can't be evaluated correctly until you limit the context in a way that there is only one possible return value left, e.g. by a selection in field ZZZZ.

see also:

Use Aggregation Functions!

It’s all Aggregations

Not applicable
Author

yes i have the count function, what do you mean by use of aggregation??

thanks

Not applicable
Author

Here is more details, i review my sintat and my varible return ''Oui'' or ''Non'' and the 'EEEE' fields containt : count({<Poche={"=$(#POC)='Oui'">} Poche)

And $(#POC) is my variable , and poche is that field from my excel wicch containt 'Oui' or 'Non'

Thanks