Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Set analysis Expression Challenge

Hi all,

I have a challenge like iam calculating count of [Quote Number DMP] when [Quote Number Status]= Approved like below


count({<[Quote Status]={'APPROVED'}>}[Quote Number DMP])


now my requirement is to include another condition where count to be calculated when the field value [Approver job name] equals to [Requester job name], kindly suggest how can i achieve it

1 Solution

Accepted Solutions
Highlighted

Or if [Approver job name] = [Requester job name] are coming from the same table in the backend, then create a flag in the script

LOAD [Approver job name],

     [Requester job name],

     If([Approver job name] = [Requester job name], 1, 0) as Flag

     ....

FROM ...

and then this

Count({<[Quote Status] = {'APPROVED'}, Flag = {1}>} [Quote Number DMP])

View solution in original post

11 Replies
Highlighted
Specialist III
Specialist III

Hello Chaitanya,

Below is the draft version of expression:

If([Approver job name]=[Requester job name], count({<[Quote Status]={'APPROVED'}>}[Quote Number DMP]))

Could you please share the application with sample data? This will help me to provide you more accurate solution.

Regards!

Rahul

Highlighted
Partner
Partner

Hi Rahul,

Here is my sample data looks like(i cannot copy app due to security restrictions) , and i tried the above expression somehow it was not working Untitled.png

Highlighted
Specialist III
Specialist III

Hello Chaitanya,

As I could see that you have list boxes for Approver Job Name & Requester Job Name fields. Where exactly you are planning to use this expression? If it is inside straight table then what other dimensions are there?

Regards!

Rahul

Highlighted

Hi,

May be try like this

=count({<[Quote Status]={'APPROVED'},

          KeyField={'=[Approver job name]=[Requester job name]'}>}

    [Quote Number DMP])

Highlighted
Partner
Partner

Hi Rahul,

basically when 'Approver Job Name' value equal to  'Requester Job Name' value then we are calculating the count of 'Quote Number DMP' (with condition [Quote Status]={'APPROVED'}), we are showing this in a textbox

Highlighted
Partner
Partner

Hi,

key field is not there , we just need to calculate when 'Approver Job Name' value equal to  'Requester Job Name' value then  count of 'Quote Number DMP' (with condition [Quote Status]={'APPROVED'})

Highlighted

Have you tried the Rahul's expression?

also check this..

=Count(Aggr(if([Approver job name]=[Requester job name] and [Quote Status]='APPROVED',[Quote Number DMP]),[Approver job name],[Requester job name]))

Highlighted
Partner
Partner

Hi,

I have tried Rahul's expression it was not working, Ok i will try this Thank you

Highlighted

Give this a try as well

Count({<[Quote Status] = {'APPROVED'}>} If([Approver job name] = [Requester job name], [Quote Number DMP]))