Jump to content
We've recently updated our Privacy Statement, available here. ×

finding the percentage difference of the value selected in a column by comparing all the row values in the same column


Vignesh Kannan

Recommended Posts

I'd l

1 0.045554

2 0.055555

3. 0.044445

N 0.044443

 

If i select I'd 1 it should show the percentage difference like (value of I'd 1 -value of I'd 2)*100Then (value of I'd 1- value of I'd 3)*100Then so on till n I'd .Again if i select I'd 2 it should show the difference like (value of I'd 2- value of I'd 1)*100 and again repreating the same for other rows based upon the value selected.

Here always smaller value shoul be in numerator since the percentage shouldn't go above 100. ( In that case it should swap the values).

Link to comment
Share on other sites

First: Create a data function which will execute on marking such that it will collect a marked value into a document property (dp1 in my case).

Second: Create a calculated column that will evaluate the required result with the expression below. In the denominator, it will use the original Id valueand it will swap the denominator (with document property value) if the resultant percentage is greater than 100.

Abs(DocumentProperty("dp1") - [Val]) * 100 / (case when (Abs(DocumentProperty("dp1") - [Val]) * 100 / [Val])>100 then DocumentProperty("dp1") else [Val] end)You can refer to the attached DXP file.

Since it involves data function, you will require TSSS (TIBCO Spotfire Statistics Services) to execute the data function on Web Player.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...