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: 
vijetas42
Specialist
Specialist

Text box expression issue

Hi All,

I am facing an issue in one scenario where i need to calculate project count where phase should be complete and sales value should be >0

In this scenario if I have two phases for single project then it should consider it as various and should not take count in completed

Project Id     Phase           Sale

1               Complete        13245

1               Inception         124134

2               Complete         124335

2                Cancelled         0

so from above example Id 1 should not get considered because it is having two phase and both are >0 in other side ID 2 should be considered because cancelled phase is having value as 0 so, it should count only completed one.


I have use expression like this,

count(DISTINCT {<[Phase]={'Complete'},[Project Id]={"=sum($(vSales))>0"}>}

if(Aggr(count(DISTINCT [Phase]),[Project Id])=1, [Project Id])) but it didn't work

Please suggest

2 Replies
vinieme12
Champion III
Champion III

i'm confused, please confirm expected output for the above table

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
malini_qlikview
Creator II
Creator II

Hi ,

You can use advanced set analysis,

try this in the expression,

Sum({<[Project Id]={"=(Sum({<Phase={'Complete'}>}Sale)-Sum({<Phase={'*'}-{'Complete'}>}Sale))=Sum({<Phase={'Complete'}>}Sale)"}>} Sale)

Attached is the sample application for the same