How to choose two/many values from filter and compute the differece based on filtered view

Hi all, I may have very specific request about the QS dashboard, hope this has some workaround.
For instance, I’d like to choose any values(let’s suppose we have two values first) from filters, and want to calculate the difference based on the view.
Filter 1 - plan1, plan2, plan3… (also put it as column in pivot table)

The pivot table like this
plan1 || plan2|| difference
quantity 5 || 3|| 2
cost 500 || 200|| 300

So is that possible to make the dashboard to calculate the difference based on filtering plan1 and plan2?

Thanks!

Hi @fangyuns and welcome to the QuickSight community!
You would have to setup 2 parameters/controls for your plans so that they can be compared to eachother, unfortunately you won’t be able to achieve by selecting from the same control.

Then you can try out a sumOver calculation with an ifelse statement that subtracts ${parameter2} from ${parameter1}.

Let me know if you have any additional questions or if this works for your case!

1 Like

Hi @fangyuns,
It’s been awhile since we last heard from you, following up to see if you had any additional questions?

If we do not hear back within the next 3 business days, I’ll go ahead and close out this topic.

Thank you!

Hi @fangyuns,
Since we haven’t heard back, I’ll close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!