Vignesh Kannan Posted March 19, 2020 Posted March 19, 2020 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).
Shashank Gurnalkar Posted March 23, 2020 Posted March 23, 2020 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.
Vignesh Kannan Posted March 23, 2020 Author Posted March 23, 2020 hi , thanks for the reply. but the percentage value is calculated wrongly.
Shashank Gurnalkar Posted March 23, 2020 Posted March 23, 2020 Let me know where you are finding incorrect output. I am able to see the correct results. Please refer to the [Test] column below.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now