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: 
brijeshvma
Partner - Creator
Partner - Creator

How to get Start Date till End date in qliksense

Hi,

I have one date field [Inventory Date] . I want to keep Start date always as 01/01/2011 and End date should be date with

Customer select in list box for Inventory Date..

set vStart =  min(Inventory Posting Date]) //// Minimum date for Posting Date is 01/01/2011.

set vEnd =  Max(Inventory Posting Date])

Sum({< [Inventory Posting Date] = {'>=$(=Date(vStart))<=$(=Date(vEnd))'} >} [Item Ledger Entry Quantity])..

When User  Select Date from List box it should sum quantity from 01/01/2011 till selected Date.

Kinldy Help me on this.. Thanks in Advanced.

8 Replies
Anonymous
Not applicable

what error you are getting?

syntax looks okay


Sum({< [Inventory Posting Date] = {'>=$(=Date(vStart))<=$(=Date(vEnd))'} >} [Item Ledger Entry Quantity])..


Also make sure both =Date(vStart)) and [Inventory Posting Date] should have same format

brijeshvma
Partner - Creator
Partner - Creator
Author

i m set ,

vStart = date('01/01/2011','DD/MM/YYYY')

VEnd = Max(date([Inventory Posting Date],'DD/MM/YYYY'))

while loading in script i m doing 

Date(Date,'DD/MM/YYYY') as [Inventory Posting Date]  ...

Still its not coming

Anonymous
Not applicable

okay, try this, I guess at main code syntax of date is different

Remove Date() from exprssion with variable, try this:

Sum({< [Inventory Posting Date] = {'>=$(=vStart)<=$(=vEnd)'} >} [Item Ledger Entry Quantity])

brijeshvma
Partner - Creator
Partner - Creator
Author

hi Balraj ,

its not giving anything .. its giving '-'

Anonymous
Not applicable

can you share sample data in excel?

Anonymous
Not applicable

Also dont forget to bypass the fields like:

=Sum({<Year=,Month=,Day=,DateField=, [Inventory Posting Date] = {'>=$(=vStart)<=$(=vEnd)'} >} [Item Ledger Entry Quantity])


Hope this will help!!

its_anandrjs

Make some change in your variable

vStart =Date(date#('01/01/2011','DD/MM/YYYY'),'DD/MM/YYYY')  //Here your date is not in date format check this

VEnd = Max(date([Inventory Posting Date],'DD/MM/YYYY'))

And then use

Sum({< [Inventory Posting Date] = {'>=$(=vStart)<=$(=vEnd)'} >} [Item Ledger Entry Quantity])

Regards

Anand

brijeshvma
Partner - Creator
Partner - Creator
Author

hi Anand,

Its Not working .. Any other Way...Thanks for ur reply..