Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikas_nandanwar
Creator II
Creator II

Last Entered Inventory Number

Hi,

I have data set including following Columns

Transaction Date, Data Week, Qty

I want last data week total Qty

Thanks,

Vikas

26 Replies
vikas_nandanwar
Creator II
Creator II
Author

Hi,

I do not want my filter with Transaction Date.

I want my filter at Month

tresesco
MVP
MVP

In the expression above, I have nowhere used the date field as filter. Instead the date field used to get the latest month and the latest week. What could be the issue you see with the expression that may be not giving your expected output behavior?

vikas_nandanwar
Creator II
Creator II
Author

The expression you have provided is working with the sample data set but not with my data

can Auto Calendar Month data  be used in expression

tresesco
MVP
MVP

It might not work within your actual data because of many possible reasons. You might have multiple years data. If so, you have to consider the year field as well or even only the date field. For multiple years data try like:

Sum({<Year={$(=Max(Year))}, [DataWeek] = {$(=Max({<[Transaction Date]={"$(=Max([Transaction Date]))"}>} DataWeek))}, Month = {$(=text(Month(Max([Transaction Date]))))}>} InvQty)


Otherwise, try to grab the logic why we used such expression and try to resolve yourself or prepare a sample with sample data with all possible scenario you might have in actual data - to let us work on that.

Anil_Babu_Samineni

Seems working. Can you share real data where it is not working for you?

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
vikas_nandanwar
Creator II
Creator II
Author

Hi,

I have created a unique column for calculation = KeyVal

I want my output as

Sum of Inv Qty @KeyVal= Max

vikas_nandanwar
Creator II
Creator II
Author

Sum({<Keyval={$(=Max(Keyval))}>}InvQty)

Is giving me the desired output