I am truing to use filter in specific order, first filter out all sub accounts to 100 and than find max year_dt, can someone please help me with the expression?
Thanks
Z
Calculations:=CALCULATE(
SUM(Inv2018T[Custom]),
FILTER(
ALL(Inv2018T[YEAR_PD]),Inv2018T[YEAR_PD]=
MAX(Inv2018T[YEAR_PD])),Inv2018T[SUB_ACCOUNT]="100")
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]YEAR_PD[/TD]
[TD="align: center"]SUB_ACCOUNT[/TD]
[TD="align: center"]DESCRIPTION[/TD]
[TD="align: center"]FAC[/TD]
[TD="align: center"]DEPT[/TD]
[TD="align: center"]SECT[/TD]
[TD="align: center"]AMT[/TD]
[TD="align: center"]YearPerStoreSect[/TD]
[TD="align: center"]Spread2018T4.%[/TD]
[TD="align: center"]Custom[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]312166[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]($160,886.00)[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]139441[/TD]
[TD="align: right"]65.29%[/TD]
[TD="align: right"]$139,441.00 [/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]149026[/TD]
[TD="align: right"]64.39%[/TD]
[TD="align: right"]$149,026.00 [/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]146470[/TD]
[TD="align: right"]65.12%[/TD]
[TD="align: right"]$146,470.00 [/TD]
[TD="align: center"]6[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] "]2017 13[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]100[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] "]INVENTORY COUNT[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]8[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]301[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]301[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]139369[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] "]2017 130008301[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]65.11%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]$139,369.00 [/TD]
</tbody>
Thanks
Z
Calculations:=CALCULATE(
SUM(Inv2018T[Custom]),
FILTER(
ALL(Inv2018T[YEAR_PD]),Inv2018T[YEAR_PD]=
MAX(Inv2018T[YEAR_PD])),Inv2018T[SUB_ACCOUNT]="100")
A | B | C | D | E | F | G | H | I | J | |
---|---|---|---|---|---|---|---|---|---|---|
2018 04 | INVENTORY | 2018 040008301 | ||||||||
2016 07 | INVENTORY COUNT | 2016 070008301 | ||||||||
2016 13 | INVENTORY COUNT | 2016 130008301 | ||||||||
2017 07 | INVENTORY COUNT | 2017 070008301 | ||||||||
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]YEAR_PD[/TD]
[TD="align: center"]SUB_ACCOUNT[/TD]
[TD="align: center"]DESCRIPTION[/TD]
[TD="align: center"]FAC[/TD]
[TD="align: center"]DEPT[/TD]
[TD="align: center"]SECT[/TD]
[TD="align: center"]AMT[/TD]
[TD="align: center"]YearPerStoreSect[/TD]
[TD="align: center"]Spread2018T4.%[/TD]
[TD="align: center"]Custom[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]312166[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]($160,886.00)[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]139441[/TD]
[TD="align: right"]65.29%[/TD]
[TD="align: right"]$139,441.00 [/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]149026[/TD]
[TD="align: right"]64.39%[/TD]
[TD="align: right"]$149,026.00 [/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]146470[/TD]
[TD="align: right"]65.12%[/TD]
[TD="align: right"]$146,470.00 [/TD]
[TD="align: center"]6[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] "]2017 13[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]100[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] "]INVENTORY COUNT[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]8[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]301[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]301[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]139369[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] "]2017 130008301[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]65.11%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]$139,369.00 [/TD]
</tbody>
Sheet1