Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
wschefter
New Contributor II

How to pull usage from specific SAP plant for previous months

Hi all;

I have a file with 50 months of usage data, 17 different locations (plants), and over 12k part numbers.  I am trying to pull data for previous months.  Here is the expression I have written:

sum({$<[Plant]={"1010"}>}{<[=[Posting Date.autoCalendar.MonthsAgo]={1}>}[Qty])

I am using part number 123456 as my test.

What I am trying to do here is pull only the usage data from [Plant] "1010" for the previous month, in this case 06-2018.  The answer should be is 18 but what I am getting is 69.  This total is for all 5 plants that used this part over the previous month.  I changed the plant to a plant that did not use the part this previous month but I still arrive at 69 as the answer.

I have used the following expression when I am pulling data for all of the months in a line or bar graph:

(sum({$<[FSE/Cust Cons]={"FSE Backpack"}>}[EUR])).

Obviously I just tried to combine both expressions together but somehow I messed it up.

Any advice would be much appreciated.

Thanks.
Will