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: 
tripatirao
Creator II
Creator II

Need help in logic

Hi All,

Can you please suggest on below requirement!!!

I have a item ledger entry table containing  [posting date](Date field),  [Quantity field]

Need to build a report  which displays data month wise for last 1 year from date selected by user.

Example if user selects date as 15-06-2017 then data should be displayed from 15-06-2016 to 15-06-2017 in below format.

june2016 , july 20166..........................june 2017

Logic to  calculate opening stock

Opening stock for current month is summation of Quantity up till previous month.

Example - For  june 2016 opening stock will be summation of quantity for all months and years which is present in database less than  equal to 31 may 2016.

  1. i.e All dates less than equal to 31may 2016. and similar approach will be followed for all months

Kindly suggest on the same urgently.

Thanks in advance!!!...:)

2 Replies
techvarun
Specialist II
Specialist II

Check the below thread.

12 month rolling data

Anil_Babu_Samineni

What you provide example insist this?

Month(DateField) as Month

MonthName(DateField) as MonthName // This should be in script

And UI, Create Chart (Any thing Bar,Line, ... Straight, Pivot)

Take MonthName as Dimension

And expression is

Sum({<Month = {">=$(=AddYears(Max(Month) , -1)) <=$(=Max(Month))"}>}Sales)

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