Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Set Analysis

Greetings All,

Can you please advise how can I write this  below query in Set analysis in a pivot table:

IF( count(bat_no) > 1, SUM(new), SUM(old))

Many Thanks!

Tags (2)
7 Replies

Re: Set Analysis

Hi,

    Here is your Expression.

    Sum(if(aggr(count(Bat_no),Dimension1,Dimension2,..) > 1,New,Old))

    Here add the dimensions name which you have included in your chart.

Regards,

Kaushik Solanki

kamalqlik
Valued Contributor

Re: Set Analysis

Hi friend ,

I think it will work for you

=sum(if(count({< bat_no= {'>=1'}>}New,Old)))

regards

Kamal

Re: Set Analysis

Hi,

    Please send us the expected output with some selection.

Regards,

Kaushik Solanki

Not applicable

Re: Set Analysis

Please find attahced the expected output file.

Gabriel
Valued Contributor II

Re: Set Analysis

Hi Pihu,

Can I suggest you write out what you wanted to achieve. As often the case, solution to the problem might not require Set Analysis function. If you can explain what the problem is and what you wanted to achieve might be helpful.

Best Regards,

Gabriel

Not applicable

Re: Set Analysis

Hello,

ProductPack NoQty1Qty2
114040
224010
234010
244020

According to this table while product count of pack no is equal to 1 then it should be qty1 else qty2.

This is what I need to calculate in a pivot table.

Thanks..!

Re: Set Analysis

Hi

     Use Product and PackNo as dimension,

     Use if(PackNo =1, sum(Qty1), sum(Qty2)) as expression

Community Browser