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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
robert_mika
Master III
Master III

Difference of two rows

Is  the a way to add an additional row to a table/pivot table?

My challenge is to take difference between two rows

Example below:

Capture.PNG

I need to know the difference between B and A for Mike and John.

Is it possible to do that in a table with expression or only script level?

13 Replies
robert_mika
Master III
Master III
Author

Hi tresesco,

Your solution works.But as you mentioned there will be more item in the table.

Is there any other approach in case I will have up to 20 or more names?

Can the pick/match pull names from a list instead of static entries?

So for each name create the same expression but change that for the difference?

Many Thanks

robert_mika
Master III
Master III
Author

Just have seen that and testing...

tresesco
MVP
MVP

In my solution, pick(match.. is in fact picking the values from dimensions. But the challenge in this approach would come when the rows increase. That means, would you expect a difference row after every couple of rows? Or, how? A sample with at least two differences would help.

robert_mika
Master III
Master III
Author

Thank you all for the input.

Tresesco/Sunny your combined effort has brought the final solutions.

Thanks.