Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have data set including following Columns
Transaction Date, Data Week, Qty
I want last data week total Qty
Thanks,
Vikas
Sum({<Keyval={$(=Max(Keyval))}>}InvQty)
Is giving me the desired output
Perhaps this?
Sum({<[Data Week] = {$(=Max([Data Week])-1)}>} Qty)
My Data set contains unique month and repeating Data Week as shown below
I want closing or last entered inventory of the month
Say Apr = 10962411.34
Months | DataWeek | Qty |
Jan | 1 | 12294609.88 |
Jan | 2 | 11979212.28 |
Jan | 3 | 12375512.48 |
Jan | 4 | 12351222.22 |
Feb | 1 | 12649753.37 |
Feb | 2 | 12649753.37 |
Feb | 3 | 12968125.98 |
Feb | 4 | 13064135.69 |
Mar | 1 | 13337458.61 |
Mar | 2 | 13337458.61 |
Mar | 3 | 0 |
Mar | 4 | 0 |
Apr | 1 | 11719474.23 |
Apr | 2 | 10615512.64 |
Apr | 3 | 10534975.27 |
Apr | 4 | 10962411.34 |
This will deserve
Sum({<[DataWeek] = {$(=Max([DataWeek]))}, Months = {'$(=Date(Max(Month(Date#(Months))),'MMM'))'}>} Qty)
Or Change it to Months from Month name to Month number, That makes more clear like
Num(Month(Date#(Months))) as MonthNum
And, then expression should be this?
Sum({<[DataWeek] = {$(=Max([DataWeek]))}, MonthNum = {'$(=Max(MonthNum))'}>} Qty)
Sum({<[DataWeek] = {$(=Max([DataWeek]))}, MonthNum = {'$(=Max(MonthNum))'}>} Qty)
And
Sum({<[DataWeek] = {$(=Max([DataWeek]))}>} Qty)
both gives me same output
When I select a single month, Out put is correct, but when all my month filters are open, It gives me sum of all entries from 4th Data week of all months.
Where are you trying this? In text box / tabular report?
Text Box
I believe should work if it is Text box? Can you show image in straight table with same expression and same in text box, Please?
Its Giving Me below numbers
Months | DataWeek | Grand Total |
Jan | 4 | 89803.95 |
Feb | 4 | 92030.71 |
Mar | 4 | 78241.58 |
Apr | 4 | 90184.88 |
May | 4 | 88442.61 |
Jun | 4 | 90278.12 |
Jul | 4 | 95113.84 |
Aug | 4 | 91170.62 |
Sep | 4 | 91172.9 |
Oct | 4 | 92571.38 |
Nov | 4 | 90084.26 |
Grand Total | 989094.85 | |