If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hello everyone
I want to ask about a query in Qlik sense Can we calculate one by one ?
For Example :
This Table Production
This Table A Sell
For my Result In column one I want Calculate Production - sell and a result get 80 and in Second Column i want to get 60 to get 60 i want calculate the stock in column one with - Second in column sell
Table excel
For my Query in this
And My result
Please Every One to Help me to resolve my problem Thank you
Hi, you can try renaming [PostingMonth of your production table to [CreateMonth], so after the join you end with a row that has ID, CreateMonth, Production and Sell.
The stock is Production-Sell, but it needs to accumulate from the first date, and probably you'll need a initial stock for each of your products, but for this adte, the accumulation can be done in the Calculate Table as:
Calculate:
LOAD
ID,
[CreateMonth]
Production,
Sell,
RangeSum(Peek(Stock),Production,-Sell) as Stock
Resident Production
Order By CreateMonth;
DROP Table Production;
DROP Table Sell;
Note that I kept production and sell in this final tabla nd remove the previous table, so only the Calculate table i kept in the final data model. I also remove the ID =1234, I didn't know what are you trying to do in that syntax, if you want to apply a filter for a product you can use the Where clause (Resident production Where Id=1234...)
Thank You for the response, i will try it