Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
tripatirao
Creator II
Creator II

Filter with Date dynamically in qlikview

=pick(Dim_No1,

'Opening Stock',

'Order',

)

For Apr 2016 My expression is given below

=pick(Dim_No1,

(//Opening Stock

(sum({<[Item Ledger Entry.Item Type]={2},[Item Ledger Entry.Posting Date]={'<=31-03-2016'}>}[Item Ledger Entry.Quantity]))

),

//Order

(sum({<[Purchase_Line.Document Type]={1},[Item Ledger Entry.Item Type]={2},[Purchase_Line.PurchaseOrderDate]={'>=01-04-2016<=30-04-2016'}>}[Purchase_Line.Quantity])),

I have master calender date that is linked with all transction date like [Item Ledger Entry.Posting Date],[Purchase_Line.PurchaseOrderDate]

for  expression opening stock for apr 2016  the data should be filtered with starting date of master calender date upto march 31st 2016

similarly for may 2016 the data shold be filtered starting date of master calender date upto  Apr 30th 2016

For expression Order the for apr 2016  the data should be filtered 1st April 2016 to 30th apr 2016

for may 2016 the data should be filtered with 1st May 2016 to 31st May 2016

Please help me with set analysis expression for date range selection.

I have attached the output of the expression which i am getting with hardcoding the date value.

Regards

Tripati

4 Replies
Anil_Babu_Samineni

I have master calender date that is linked with all transction date like [Item Ledger Entry.Posting Date],[Purchase_Line.PurchaseOrderDate]

From here, Do you have single calendar or multiple. If single calendar, What was the calendar date field name and then which is Fact date field.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vinieme12
Champion III
Champion III

Dates in Set Analysis

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
tripatirao
Creator II
Creator II
Author

Hi anil

thanks for quick reply.

have  single master calender and the date field is IncCalender Date.



Regards

Tripati



Anil_Babu_Samineni

Would you provide application, please to check whether it works or not


Here, you go sample expression to get idea and it helps to you


Sum({<[Purchase_Line.Document Type]={1},[Item Ledger Entry.Item Type]={2}, Calendardate = {">= $(=Date(Min(CalendatDate),'DD-MM-YYYY')) <= $(=AddMonths(MonthEnd(Date(Max(CalendarDate),'DD-MM-YYYY')),-1))"}>} [Purchase_Line.Quantity])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful