Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
joey_lutes
Contributor

Min Max Date Set Analysis Failure

Something that I would have thought should take me 30 seconds to write has now caused me multiple hours of research and dozens of iterations.

Simple  I need 2 numbers:

Sum({$<ForecastDate = {'$(=Max({1}ForecastDate))'}>}ForecastUtilization)

Sum({$<ForecastDate = {'$(=Min({1}ForecastDate))'}>}ForecastUtilization)

With or without the {1}, adding quotes, removing them, changing around DSE, etc. . . .

SO, I went the variable route:

ReportDateTemp:

  Load

        max(ReportDate) as MaxReportDate,

        min(ReportDate) as MinReportDate,

        max(ForecastDate) as MaxForecastDate,

        min(ForecastDate) as MinForecastDate

Resident ForecastData;

Let vMaxReportDate = Peek('MaxReportDate');

Let vMinReportDate = Peek('MinReportDate');

Let vMinForecastDate = Peek('MinForecastDate');

Let vMaxForecastDate = Peek('MaxForecastDate');

Drop Table ReportDateTemp;

Now I have vMinForecastDate and vMaxForecastDate = both of which display perfectly in a KPI box.

The set analysis is still defeating me.

I've tried:

Sum({$<ForecastDate = {'$(=$(vMinForecastDate))'}>}ForecastUtilization)  //returns 0

Sum({$<ForecastDate = {'$(vMinForecastDate)'}>}ForecastUtilization) //returns 0

I'm sure it's silly.  Hoping so, Help?

1 Solution

Accepted Solutions

Re: Min Max Date Set Analysis Failure

May be try using Date() function around your variable with the date format of your date field. I think the format mis-match might be causing this

2 Replies

Re: Min Max Date Set Analysis Failure

May be try using Date() function around your variable with the date format of your date field. I think the format mis-match might be causing this

joey_lutes
Contributor

Re: Min Max Date Set Analysis Failure

Yup, that was it.  Glad it was simple.  Live and learn.

Thanks again   You rock!