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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

can anyone write in Setanalysis

count(if(AgentOrDist='A',AgentID))/count(TOTAL <[Zone],[Region],[Cluster],[JC]> if(AgentOrDist='A',AgentID))

Hello everyone ,

Help me write in setanalysis,

Thanks In Advance

1 Solution

Accepted Solutions
anushree1
Specialist II
Specialist II

Try This:

=count({<AgentOrDist={'A'}>}AgentID)/count(TOTAL <[Zone],[Region],[Cluster],[JC]> {<AgentOrDist={'A'}>}AgentID)

View solution in original post

4 Replies
anushree1
Specialist II
Specialist II

Try This:

=count({<AgentOrDist={'A'}>}AgentID)/count(TOTAL <[Zone],[Region],[Cluster],[JC]> {<AgentOrDist={'A'}>}AgentID)

Not applicable
Author

Anychance we can right this in setanalysis

if(vJCFactor=1,

COUNT(DISTINCT IF(aggr((sum(if(TranDt>=$(vFromDate) AND TranTyp='CO',TranAmt))/SUM(AGGR(if(DsbrDate>=$(vFromDate) and DsbrDate<=Today

  AND DsbrDate >= MonthStart(min(TranDt)) and DsbrDate <= MonthEnd(max(TranDt)), SUM(DisbrAmt)),DsbrDate,JC))),JC)>=.5,JC)),

if(vJCFactor=2,

COUNT(DISTINCT IF(aggr

(SUM(if(TranTyp='CB' AND TranDt>=$(vFromDate), TranAmt))/

SUM(AGGR(if(DemandDate>=$(vFromDate) and DemandDate<=Today

            AND DemandDate >= MonthStart(min(TranDt)) and DemandDate <= MonthEnd(max(TranDt)), SUM(DemandAmt)),DemandDate,JC)),JC)

>=.75,JC)),

if(vJCFactor=3,

COUNT(DISTINCT IF(aggr(count(DISTINCT if($(AgntMonthlyComm)>=2500 AND AgentOrDist='A',AgentID))

  /count(DISTINCT if(AgentOrDist='A',AgentID)),JC)>=.4,JC)),

if(vJCFactor=4,

COUNT(DISTINCT IF(aggr(sum(if(TranDt>=$(vFromDate) AND TranTyp='DR',TranAmt))/$(vTotalTranAmt),JC)>=.2,JC)),

COUNT(DISTINCT IF(aggr(COUNT(DISTINCT IF(Status='A' and AgentOrDist= 'A',AgentID))

  /COUNT(DISTINCT IF(AgentOrDist= 'A',AgentID)),JC)>=.5,JC))))))

CarlosAMonroy
Creator III
Creator III

Hi Charlie,


Try:


if( AgentOrDist = 'A', count(AgentID)/Count(Total <[Zone],[Region],[Cluster],[JC]> AgentID))


or


count({<AgentOrDist = {'A'}>}AgentID)/count(Total <[Zone],[Region],[Cluster],[JC]> {<AgentOrDist = {'A'}>}AgentID)



Hope it helps,

Carlos M

Not applicable
Author

thanks its Helpful, how about the other one?

can you able to write it?