Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Newb needs help - variables and dates in expressions

Quick information: InvDate and Qty come from an Excel spreadsheet which is loaded. Date is in MM/DD/YYYY format, quantity is an integer. RealDate comes from MasterCalendar script. A KPI with the expression of max(RealDate) or min(RealDate) display the correct dates.

I have created a KPI where I am trying to get the inventory for the start and end of the selected date range. When using Sum({$<[InvDate] = {'08/20/2017'}>}Qty) I get the correct information in the KPI.

What I really need, however, is the information to update based on the dates selected. So I tried Sum({$<[InvDate] = {"Date(max(RealDate),'MM/DD/YYYY')"}>}Qty) but I get 0.

I also tried Sum({$<[InvDate] = {"Date($(vMaxRealDate),'MM/DD/YYYY')"}>}Qty) where vMaxRealDate is a variable of Max(RealDate). This also gets me a result of 0.

Please help, as this is the big thing holding me back from finishing an important project for the company.

Thanks in advance.

1 Solution

Accepted Solutions
agigliotti
MVP
MVP

maybe this:

Sum( {$ < [InvDate] = {"$(=Max(Date(RealDate,'MM/DD/YYYY')))"} >} Qty )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

3 Replies
agigliotti
MVP
MVP

maybe this:

Sum( {$ < [InvDate] = {"$(=Max(Date(RealDate,'MM/DD/YYYY')))"} >} Qty )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Not applicable
Author

Thank you very much. I have been trying to figure this out for almost 2 business days.

sunny_talwar
MVP
MVP

Try this

Sum({$<[InvDate] = {"$(=Date(Max(RealDate),'MM/DD/YYYY'))"}>} Qty)