Filter in specific order

Zibi

Board Regular
Joined
Feb 2, 2012
Messages
73
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")

ABCDEFGHIJ
2018 04INVENTORY2018 040008301
2016 07INVENTORY COUNT2016 070008301
2016 13INVENTORY COUNT2016 130008301
2017 07INVENTORY COUNT2017 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
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top