• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Unique filter

kme

Member
We have Data Sheet in Sheet 1
In this Need to Filter Employee Sales Target And Profit Target
Target Unique

Some Employee Target are in another Branches also. if Need to ADD Target But Drop down Selection Only Employee Name (Colum D3). No Branch Selection

SINGLE FORMULA REQUIRED


EMPLOYESALES TARGTEPROFIT TARGTE
SILV
15500​
3550​
SAMU
20800​
2000​
LIO
15000​
3300​
KIRA
5000​
500​
 

Attachments

  • Jan-222.xlsx
    14.1 KB · Views: 5
A power query solution

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"EMPLOYEE", "SALES TARGET", "PROFIT TARGTE"}, {{"Count", each Table.RowCount(Table.Distinct(_)), Int64.Type}}),
    #"Grouped Rows1" = Table.Group(#"Grouped Rows", {"EMPLOYEE"}, {{"SalesTarget", each List.Sum([SALES TARGET]), type number}, {"ProfitTarget", each List.Sum([PROFIT TARGTE]), type number}})
in
    #"Grouped Rows1"
 

Attachments

  • Jan-222.xlsx
    22.6 KB · Views: 0
In G8 followed by ENTER:

Code:
=LET(g,GROUPBY(Sheet1!C2:C14,HSTACK(Sheet1!H2:H14,Sheet1!I2:I14),SUM,,0),
IF(D3="",g,FILTER(g,INDEX(g,,1)=D3)))
 
In G8 followed by ENTER:

Code:
=LET(g,GROUPBY(Sheet1!C2:C14,HSTACK(Sheet1!H2:H14,Sheet1!I2:I14),SUM,,0),
IF(D3="",g,FILTER(g,INDEX(g,,1)=D3)))
Answer Came Wrong . Result through above formula Sum Figure. We Need Unique Amount If Same Employee Target Have In Another Branch That Amount also Consider Example "Silva" have Target Different Branches .

Only Selection Employee Name , No Selection of Branch

BRANCH CONSEMPLOYEESALES TARGETPROFIT TARGTE
ARKK-ARIKASILV
15000​
3300​
OPPO-OPPOSILV
500​
250​
TOTAL
15500​
3550​



Can I Get Excel Formula .
EMPLOYESALES TARGTEPROFIT TARGTE
SILV
15500​
3550​
SAMU
20800​
2000​
LIO
15000​
3300​
KIRA
5000​
500​
 
Not even a 'thank you'??? Mmm ... :confused:

I based it on what you showed in post #1. You are now showing very different expectations. Please mock up in the workbook a few rows of expected results, because I really have no clue what you want.

But I'll have ONE guess:
Code:
=LET(g,GROUPBY(HSTACK(Sheet1!C2:C14,Sheet1!B2:B14),HSTACK(Sheet1!H2:H14,Sheet1!I2:I14),SUM,,0),
IF(D3="",g,FILTER(g,INDEX(g,,1)=D3)))
 
Based on the expected results provided, try the following:
Code:
=LET(
   rng, TRIMRANGE(Sheet1!B:I,2,0),
   one, DROP(GROUPBY(TAKE(rng,,2),TAKE(rng,,-2),MAX,3,0),,1),
   two, GROUPBY(TAKE(one,,1),TAKE(one,,-2),SUM,3,0),
   SORTBY(two,XMATCH(TAKE(two,,1),UNIQUE(INDEX(rng,,2))))
)
 
Back
Top