Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression Syntax...

Hello,

What is the error in this syntax:

=Count({<[@Lead_Lead Type] = {"Student"}, @Lead_Status={"Submitted"}>}DISTINCT(%LEADID))

Its not working, giving all values 0.

pls suggest.

9 Replies
amit_saini
Master III
Master III

Hi,

The correct syntax is count(distinct Staff_Name)

Try with this.

Thanks,
AS

tresesco
MVP
MVP

Syntax seems good. Problem could possibly be somewhere else. Can you share your sample qvw?

Anonymous
Not applicable
Author

Tresco,

If I remove @Lead_Status from Set, its work fine.

But I have to add one expression which will show total forms....any other syntax?

its_anandrjs

Try this expression

=Count(DISTINCT {<[@Lead_Lead Type] = {'Student'}, [@Lead_Status] = {'Submitted'}>} [%LEADID] )

Note:- Also check your field name weather it is correct that you use expression seems correct.

Regards

Anand

tresesco
MVP
MVP

  If I remove @Lead_Status from Set, its work fine.

That means there is no data for the combination - [@Lead_Lead Type] = "Student" And @Lead_Status="Submitted"

Select lead type 'Student' in the list box, you probably won't see lead status 'Submitted' in the white(possible) color.

Anonymous
Not applicable
Author

No,

Data is their. If I use [@Lead_Lead Type] = "Student" only and then selecting "Form" from list box its working fine and giving me correct data.

But If I m putting it into expression, its not working....

SunilChauhan
Champion II
Champion II

Count(DISTINCT {<[@Lead_Lead Type] = {'Student'}, [@Lead_Status] = {'Submitted'},fieldname={'Form'}>} [%LEADID] )

Sunil Chauhan
tresesco
MVP
MVP

Can you share your sample qvw that demonstrates the issue(with explanation)?

PrashantSangle

Hi,

Debug your expression by trying following steps

Take @Lead_Lead Type,@Lead_Status,%LEADID in list box

select @Lead_Lead Type list box select Student and

@Lead_Status list box selct Submitted and then check

Is there any value in %LEADID list box.

and if possible kindly post those screen shot with selected parameter or share data with sample qvw

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 🙂