Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using lowest selected value in set analysis

I have the following data and wish to know how many workers  start work on the first week of any selection. With no selection, therefore only one person starts work on the first week (that is Worker JS on 200313),

I wish to build a table of who manages those starters. I have a straight table with the manager dimension and the expression count(distinct {$<YearWeek = {"=min(YearWeek)"}>} Worker) This gives me 1 for Bill and 2 for Dave. I therefore explored the AGGR function and used count(distinct {$<YearWeek = {"=aggr(min(YearWeek),Manager)"}>} Worker) but with the same results.

Can anyone help on this. In essence I need to use the lowest selected value in set analysis regardless of Dimension

Thanks

Dave

Manager Worker YearWeek
BillIK200316
BillIK200317
BillIK200318
DaveDS200315
DaveDS200316
DaveDS200317
DaveDS200318
DaveDS200319
DaveDS200320
DaveJS200313
DaveJS200314
DaveJS200315
DaveJS200316
DaveJS200317
DaveJS200318
DaveJS200319
1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try a set expression using a dollar sign expansion in your set modifier:

=count(distinct {$<YearWeek = {$(=min(YearWeek))}>} Worker)

View solution in original post

2 Replies
swuehl
MVP
MVP

Try a set expression using a dollar sign expansion in your set modifier:

=count(distinct {$<YearWeek = {$(=min(YearWeek))}>} Worker)

Not applicable
Author

Thank you swuehi for super fast response. That worked a treat