Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
afsarshaikh
Creator
Creator

List data only if possible values are true

Hi Everyone,

I stucked in some logic and i need a help from you.

I'm sharing an example below, which has 3 columns as Manager, Employee and Project Assigned.

I wan't to list only those manger whose all employees have project assigned.

So, in below example only Manger XYZ should be shown since, under him everyone's project assigned. Also, Manager 'ABC' shouldn't be displayed since, it has N and NULL values.

Could anyone help me to achieve this? Thanks

Manager EmployeeProject Assigned
ABCE1Y
ABCE2N
ABCE3NULL
XYZE4Y
XYZE5Y
XYZE6Y

Regards,

Afsar Shaikh

Regards,
Afsar Shaikh
Project Manager- QlikView Dev. & Support
Afsar Shaikh
Email- afsar.shaikh@live.com
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try this in a text box:

=Concat(DISTINCT{<Manager={"=Count(Distinct Employee)=Count(Distinct {<[Project Assigned]={'Y'}>} Employee)"}>}Manager, ',')

View solution in original post

11 Replies
swuehl
MVP
MVP

=Concat( Aggr(If(Only([Project Assigned])='Y',Manager), Manager),', ')

e.g. in a text box

tresesco
MVP
MVP

Try this in a text box:

=Concat(DISTINCT{<Manager={"=Count(Distinct Employee)=Count(Distinct {<[Project Assigned]={'Y'}>} Employee)"}>}Manager, ',')

afsarshaikh
Creator
Creator
Author

Thanks for your reply Stefan.

However, i'm still getting NULL values.

Regards,
Afsar Shaikh
Project Manager- QlikView Dev. & Support
Afsar Shaikh
Email- afsar.shaikh@live.com
afsarshaikh
Creator
Creator
Author

Thanks for your reply Tresesco.

However, i'm still getting NULL values.

I wan't to display a manager name only if all the values are Y in column 3.

If any of the value is other than Y, no manager to be displayed.

Regards,
Afsar Shaikh
Project Manager- QlikView Dev. & Support
Afsar Shaikh
Email- afsar.shaikh@live.com
PrashantSangle

Hi,

create listbox with below expression

Aggr(If(Only([Project Assigned])='Y',Manager), Manager)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Do you have a sample? In my sample it is working fine. PFA

Kushal_Chawda

try like below,

create a key in table,

load *,

       recno() as Key

FROM table;

Now try below expression

=Concat(DISTINCT{<Key={"=Count(Distinct {<[Project Assigned]={'Y'}>} Employee)=Count(Distinct {<[Project Assigned]={'Y'}>} Manager)"}>}Manager, ',')

afsarshaikh
Creator
Creator
Author

I don't have sample data but, I've <space> as a value in my 3rd column. So, it's considering that too...

Regards,
Afsar Shaikh
Project Manager- QlikView Dev. & Support
Afsar Shaikh
Email- afsar.shaikh@live.com
tresesco
MVP
MVP

No, that should not be the reason, only 'Y' values is being considered.