Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Count of a column when associated values on another column are on same status

Hi,

 

I have three columns: Objective, Results, Status

I want to calculate the count of Objectives only when all the associated "Results" have status "Completed"

Attached the screenshot.

@sunny_talwar  @swuehl  @amit_saini  @Anil_Babu_Samineni @Kush @nateuntiedt  @rwunderlich  @marcus_sommer 

1 Solution

Accepted Solutions
Highlighted
Creator
Creator

Re: Count of a column when associated values on another column are on same status

Thanks Marcus, but your calculation is giving one extra count. 

The following calculation gives exact count: 

=COUNT(DISTINCT AGGR(if(count( [Product Key Result])=count({<Status={'COMPLETE'}>}Status), ONLY( [Product Objective])), [Product Objective]))

View solution in original post

7 Replies
Highlighted
Master II
Master II

Re: Count of a column when associated values on another column are on same status

=count({<Results = {'Completed'}>}Objective)

Highlighted
Creator
Creator

Re: Count of a column when associated values on another column are on same status

Hi, I want to count the objective only when all it's results has
"completed" status.


Highlighted
Master II
Master II

Re: Count of a column when associated values on another column are on same status

Did you try what I suggested?

Highlighted
Creator
Creator

Re: Count of a column when associated values on another column are on same status

Yes, it is counting the objective even if it has 1 result as Completed.
Objective should be counted only when all of it's results are Completed
Highlighted
MVP & Luminary
MVP & Luminary

Re: Count of a column when associated values on another column are on same status

Try it with:

sum(aggr(-(count({<Results = {'Completed'}>}Objective)=count(Objective)),Objective))

- Marcus

Highlighted
Creator
Creator

Re: Count of a column when associated values on another column are on same status

Thanks Marcus, but your calculation is giving one extra count. 

The following calculation gives exact count: 

=COUNT(DISTINCT AGGR(if(count( [Product Key Result])=count({<Status={'COMPLETE'}>}Status), ONLY( [Product Objective])), [Product Objective]))

View solution in original post

Highlighted

Re: Count of a column when associated values on another column are on same status

@Prabhu You got the answer? If so, please mark yourself as correct answer. If not, Please free to ask.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)