Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Using a Variable in an Expression in a Bar Chart

I'm trying to limit a bar chart to use only the latest date from the underlying data. (Other charts use the data for the latest month.)

The data load sets a variable called vMaxDate - right now the value of vMaxDate is 2012-12-31.

If I set the Expression for the bar chart to

     NumericCount({$<BusinessDate={$(vMaxDate)}>} BusinessDate)

I get nothing on the chart.  However, if I replace $(vMaxDate) with its value and use

     NumericCount({$<BusinessDate={'2012-12-31'}>} BusinessDate)

I get a correct chart.

1 Solution

Accepted Solutions

Re: Using a Variable in an Expression in a Bar Chart

Try

NumericCount({$<BusinessDate={"$(vMaxDate)"}>} BusinessDate)

or

NumericCount({$<BusinessDate={"$(=vMaxDate)"}>} BusinessDate)

2 Replies
Not applicable

Re: Using a Variable in an Expression in a Bar Chart

Dear jerryl_gs,

It's looks to me syntax is correct

can you try like this.

=NumericCount({$<BusinessDate={'$(vMaxDate)'}>} BusinessDate)

else can you post the sample qvw.

so that i can help you.

Thanks,

Mukram.

Re: Using a Variable in an Expression in a Bar Chart

Try

NumericCount({$<BusinessDate={"$(vMaxDate)"}>} BusinessDate)

or

NumericCount({$<BusinessDate={"$(=vMaxDate)"}>} BusinessDate)

Community Browser