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
mdmukramali
Specialist III
Specialist III

Hi Vikas,

Anil solution is working fine,

have a look :

=Num(Sum({<MonthNum={'$(=Max(MonthNum))'},DataWeek={'$(=Max(DataWeek))'}>}Qty),'#,##0')


PFA,


Thanks,

Mukram.

Anil_Babu_Samineni

May be this?

Max({<[DataWeek] = {$(=Max([DataWeek]))}, MonthNum = {'$(=Max(MonthNum))'}>}Aggr(Sum({<[DataWeek] = {$(=Max([DataWeek]))}, MonthNum = {'$(=Max(MonthNum))'}>} Qty)))

This will return as below in text box? 90084.26

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
Anil_Babu_Samineni

My bad, Months and DateWeek should cover for Aggr()

Max({<[DataWeek] = {$(=Max([DataWeek]))}, MonthNum = {'$(=Max(MonthNum))'}>}Aggr(Sum({<[DataWeek] = {$(=Max([DataWeek]))}, MonthNum = {'$(=Max(MonthNum))'}>} Qty), Months, DataWeek))

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

Nope incorrect expression

vikas_nandanwar
Creator II
Creator II
Author

I am attaching my data sheet and my App

Please check

vikas_nandanwar
Creator II
Creator II
Author

I am attaching my data sheet and my App

Please check

vikas_nandanwar
Creator II
Creator II
Author

Hi,

I am attaching my excel and app

tresesco
MVP
MVP

What is your expected output in the sample provided? For latest week's data try:

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

vikas_nandanwar
Creator II
Creator II
Author

90084.26
tresesco
MVP
MVP

Try my above expression.