Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have attached some data , now in this, for example
ex: Material 1011 & 1012 has week = 2 (this is the case when you can select only 1 Material )
Firstsortedvalue(Avail.qty,+Avail.qty) whose result is 510
Firstsortedvalue(Avail.qty,+Avail.qty) whose result is 530
BUT
if you select Both 1011 & 1012 Materials in filter pane The values should get Added i.e. Result = 510+530= 1040
and this is the required result but the above expression doesn't work so please guide
Table:
Material | Deli. date | week | elements | Req. qty | Avail.qty |
1011 | 09-01-19 | 2 | A | -5 | 500 |
1011 | 11-01-19 | 2 | B | 10 | 510 |
1012 | 09-01-19 | 2 | A | 10 | 500 |
1012 | 11-01-19 | 2 | B | 30 | 530 |
And there is 1 more case where
firstsortedvalue (avail.qty,+avail.qty) of 1011 for week 6 is = 382 &
firstsortedvalue (avail.qty,+avail.qty) of 1012 for week 6 is = -125
& the result when i add these two , I should get Result = 382-125 = 257, but i am not able to get it.
Table:
Material | Deli. date | week | elements | Req. qty | Avail.qty |
1011 | 04-02-19 | 6 | A | -2 | 508 |
1011 | 05-02-19 | 6 | A | -10 | 498 |
1011 | 05-02-19 | 6 | A | -1 | 497 |
1011 | 05-02-19 | 6 | A | -2 | 495 |
1011 | 05-02-19 | 6 | A | -5 | 490 |
1011 | 05-02-19 | 6 | A | -8 | 482 |
1011 | 05-02-19 | 6 | A | -100 | 382 |
1012 | 04-02-19 | 6 | A | 40 | 570 |
1012 | 05-02-19 | 6 | A | -20 | 550 |
1012 | 05-02-19 | 6 | A | -5 | 545 |
1012 | 05-02-19 | 6 | A | -10 | 535 |
1012 | 05-02-19 | 6 | A | 30 | 565 |
1012 | 05-02-19 | 6 | A | 10 | 575 |
1012 | 05-02-19 | 6 | A | -700 | -125 |
So please help!!
Thank you I got the required result!! I had to make slight change in your expression
Exp : Sum(Aggr(Firstsortedvalue(Avail.qty, Avail.qty), Material))
I have used Exp: Sum(Aggr(Firstsortedvalue([Avail. qty], +[Avail. qty]),[Date_D.autoCalendar.Week], Material))
(since I have weeks as dimension)
Try this
Sum(Aggr(Firstsortedvalue(Avail.qty, Avail.qty), Material))
It is adding the values now but in my data I have week 16 at the bottom which I have not attached & it is giving a null value for that week.
Thank you I got the required result!! I had to make slight change in your expression
Exp : Sum(Aggr(Firstsortedvalue(Avail.qty, Avail.qty), Material))
I have used Exp: Sum(Aggr(Firstsortedvalue([Avail. qty], +[Avail. qty]),[Date_D.autoCalendar.Week], Material))
(since I have weeks as dimension)