Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis Expression for a single item

In a pivot table having item codes, and sum of item cost (with some calculations and conditions), I want to have separate calculation for just one item. How do I do that in the fronted using set analysis?

Eg.

Header 1Header 2
100014567
10002232131
1000332233
10004
100053486

Here I want 10004 to be calculated as  10002/10001 (Division) i.e. (232131/4567). How do I do?

TIA

8 Replies
robert_mika
Master III
Master III

What's the logic behind that?

What if you had two gaps?

MayilVahanan

Hi

Try using if condition something like this

=If([Header 1] = 10004, Above([Header 2],2)/Above([Header 2],3), Sum([Header 2]))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Which two gaps?

Anonymous
Not applicable
Author

Thank you Mayil. But this is just an example. the real data has dynamic labels, alternate states and many rows. so unable to implement it.

Anonymous
Not applicable
Author

It is a P&L report where a particular code is a division result of two codes.

robert_mika
Master III
Master III

You gave example with one gap.

What if you have more than one gap or gaps with two or more rows

SunilChauhan
Champion II
Champion II

simply use below funtion

below(Header2)/Header2

or

below(sum(Header2))/sum(Header2)

hope this helps

Sunil Chauhan
tresesco
MVP
MVP