Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

mrudolphi
Contributor

limit data that is plotted in line chart

Is it possible to limit the data plotted for one field of a dimension but not another?

Example:

Plotting in a line chart actuals and forecasts of different markets.  Dimension are the combination of  'Markets' and 'Scenario' plotted by month.  Expression is the price.

Assume Scenarios can be Actual, Forecast1, Forecast2, etc... and Markets can be Apples, Oranges, Grapes, etc....

Actual is updated each month with the latest actual data.  Each forecast is a combination of actuals (at the time of the forecast) and forecasts for the remaining months in the year (example Forecast2 is 2 months of actuals and 10 months of forecast).

Lets say its now Sept and I have actuals through August.  I plot all my past forecasts along with the actual scenario (lets say for just the Apples market).   What I would like to do is use a variable (or something) that will limit the plotting of Actuals to a specific month.  Say I only want to plot actuals through June even though I have actuals through August. I want to see the full year plotted of my forecasts but I want actuals to stop at June.

Can this be done?

5 Replies
MVP
MVP

Re: limit data that is plotted in line chart

Yes, you can use Set Analysis to limit the data set for the Actuals by Month. The actual syntax of the Set Analysis condition largely depends on the formatting of your data fields, such as Month.

cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

mrudolphi
Contributor

Re: limit data that is plotted in line chart

Thanks

I have it working but have one problem.  I can stop the data at a specific point but its ignoring my overall date selection and therefore x axis shows all dates (with actuals plotted for the selected months).

here is my expression

if(Scenario='Actual',only({<Month_Year={'<3/1/15'}>}[Price per Unit]),only({$}[Price per Unit]))

mrudolphi
Contributor

Re: limit data that is plotted in line chart

Got it

if(Scenario='Actual',only({<Month_Year={'>1/1/13<3/1/15'}>}[Price per Unit]),only({$}[Price per Unit]))

This works

mrudolphi
Contributor

Re: limit data that is plotted in line chart

ok, how do I incorporate variables in this?  I want to incorporate my variables vStartDate and VEndDate

if(Scenario='Actual',(only({$<Month_Year={'>=1/1/13<=3/1/15'}>}[Price per Unit])),only({$}[Price per Unit]))

I've tried replacing the hard coded dates with my variables but that does not work.

Not applicable

Re: limit data that is plotted in line chart

Hi,

You can do it in the dimension limit tab.

Community Browser