LET() and FILTER() help needed

realtoast

New Member
Joined
Nov 24, 2015
Messages
41
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
Experts, I'm a couple hours into a puzzle. I am creating a single cell dynamic spilled array with the LET() function. From the below table snippet, the result I want is a dynamic table that filters for Type = Medical. The formula I've come up with that almost works is:

=LET(
f,FILTER(Data, Data[Type]="Medical"),
y,Data[Year],
type,Data[Type],
c,Data[Carrier],
t,Data[TotalCost],
erperc,Data[ER%],
er,Data[ER Total],
tbl,CHOOSE({1,2,3,4,5,6},f,type,c,t,erperc,er),
tbl)

In the table, Data, the fields are:
YearTypeCarrierPlanTierEnrollmentRateER%EE%ER RateEE RateER TotalEE TotalTotalCost

The result I want from the above LET() is

YearType (Medical only)CarrierTotalCostER%ERTotal

In the table, there are the following "Type"s. I want to exclude all types except Medical:

Dental
Life ADD
LTD
Medical
STD
Vision

My table has a couple thousand records, so I hope the above examples make sense. The above formula results in the below result, which is not filtering for Medical only. Here are pics of the data table, Data, and the result of the above formula

Screenshot 2024-08-02 at 2.52.15 PM.png


Screenshot 2024-08-02 at 2.49.52 PM.png
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hello, what does this return:

Excel Formula:
=CHOOSECOLS(FILTER(Data,Data[Type]="Medical"),1,2,3,14,8,12)
 
Upvote 0
Solution

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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