Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

issue with using variables in a chart

Hi,

I am using QV 10 desktop and it seems that the variables don't seem to fit in the chart expressions. I get a red underline on the variable. i have used a QVS file to load variabes.

CODE: But when i use this variable in the Chart - expression tab, data is not displayed.

SET vIncl = "'cidentId = '";

SET vExcludeDates = "'MonthYear= , Week = , Day = '";

count({$< $(vExcl), $(vIncl) >} distinct AblemID)

I get an error in the above expression.

5 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

I think you are defining the variables in wrong way. Please  go to the Settings---->Variable overview to see your variable.

Regards

Vijay

Not applicable
Author

i m using a QVS file to define variables. There is no with the load as QlikView is able to load it without any errors.

vijay_iitkgp
Partner - Specialist
Partner - Specialist

There is nothing wrong in syntex thts'y qlikview is not throwing any error. But if you see the variable overview then you can find what r u setting the variable values

Not applicable
Author

fine, i will check with the syntax. my original question was QV 10 throws an error when we use variables in a chart expression.

has any body tried using variables in a chart expression in the foll. way?

count({$< $(vVAR1), $(vVAR2) >}distinct EmblemID)

when i use this in a chart expression, there is a red underline on vVAR1.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

=count({$< $(=(vExcl& ',' & vIncl) >} distinct AblemID)

Regarsd,

Jagan.