Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ramyasaiqv
Creator II
Creator II

Set expression help

Hello Community,

I am trying to make the set analysis work for my  requirement  and need some help. In the attached .qvf when i select the owner as "ann johnson" and employee as "Kim Keith" the number of  ideas should be 5 but the set expression i wrote returning 0 . please can someone help me with the set expression.

Thank you,

ramya

1 Solution

Accepted Solutions
Lech_Miszkiewicz

OK

i will try to explain this step by step

  • You select: Owner = Ann Johnson
  • Employee = Kim Keith

For above selection your IF statements does not contain true values as: OrgUser = KimKeith and there is no Kim Keith for this selection in Name field

therefore you get 0!

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

6 Replies
Lech_Miszkiewicz

Hi,

it is quite simple

your sample returns zero for conditions you are selecting:

COUNT({<[Team Role]={'Originated Idea'},[Division]=,[Department]=,[Org Unit]=,[Business Area]=>} DISTINCT If([OrgUser]=[Name],Idea)) + SUM(0)

For selections you are saying OrgUser is not equal to Name, therefore you have 0.

So in theory there is nothing wrong with your expression.

1.png

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
ramyasaiqv
Creator II
Creator II
Author

Hi,

Thank you for the response. The condition says orguser equals to Name. The result for the selections should be 5 not 0. How can i write the set expression to achieve that result?

Thank you,

ramya

Lech_Miszkiewicz

OK

i will try to explain this step by step

  • You select: Owner = Ann Johnson
  • Employee = Kim Keith

For above selection your IF statements does not contain true values as: OrgUser = KimKeith and there is no Kim Keith for this selection in Name field

therefore you get 0!

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
raman_rastogi
Partner
Partner

Hi Ramya

There is nothing wrong with your expression Check Your data there is no matching value when owner are "ann johnson" and employee as "Kim Keith" and [Team Role]='Originated Idea'.


Regards

Raman

ramyasaiqv
Creator II
Creator II
Author

Thank you raman.

ramyasaiqv
Creator II
Creator II
Author

Thank you Lech