How to caclulate Percentge difference between eche row to the first column?

Hi,
I have table with rows of experiment version (0,1,2) . and values of few matrices, and to ache matrices, I have more value with the Percentage diff between the value of the row to the second row.
for some values we created calculated field for this:
for example:
percentDifference({AVG Transactions Per Payer - DT},[{EXPERIMENT_VERSION} DESC],1)
and in some of them we used the option of 'add table calculation → Percentge difference.

in both ways, it calculate the diff between 0 to 1 and between 1 to 2.
and I want to create the option to calculate the diff between 0 to 1 , and 0 to 2 .
how can I do it ?
I tried to use if EXPERIMENT_VERSION = 1 then … or EXPERIMENT_VERSION = 2 then …

but I got an error.
Thanks!

Hi @anatez and welcome to the QuickSight community!
Could you provide some additional context for your situation? Will you always be looking to find the percent difference based on the first row and will the first row be variable?
If possible, a screenshot of your table along with the calculation that you tried but received an error so that we can see what might be causing the error.

Thank you!

1 Like

Hi @anatez,
It’s been awhile since we last heard from you, were you still in need of help with your topic?

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

Thank you!

Hi @anatez,
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 possible.

Thank you!