Naveen Tibco Posted August 7, 2019 Share Posted August 7, 2019 Dear experts, Product sales price discount price Charcoal gill 13200 82 Deluxe Satinless Grill 14500 22 Gas grill 2 burner 18000 12 Gas grill 2 burner sainless 16000 43 Grand Total 61700 159 I took cross table in Spotfire as above data set. i am using 4 input field properties for 4 rows indiscount price. example : if user enter 1st input filed value as 12then result row would be "Charcoal gill" "13200" "12 " if user enter 2ndinput filed value as 48then resultrow would be "Deluxe Satinless Grill" "14500" "48" if user enter 3rdinput filed value as 23then resultrow would be "Gas grill 2 burner" "18000" "23" if user enter 4thinput filed value as 19then result row would be "Gas grill 2 burner sainless" "16000" "19". How can i achived this. i.e if user enter any value in "input filed" then discount price row has to replace with the input value. Thanks & Regards Naveen Link to comment Share on other sites More sharing options...
Khushboo Rabadia Posted August 27, 2019 Share Posted August 27, 2019 You can achieve this using case when conditional statements in cell value expression of cross table, assuming all input fields are of integer type: Sum(SN(case when BaseRowId()=1 then case when ${inp1}=0 then [Column 3] else ${inp1} end end,0) + SN(case when BaseRowId()=2 then case when ${inp2}=0 then [Column 3] else ${inp2} end end,0)+SN(case when BaseRowId()=3 then case when ${inp3}=0 then [Column 3] else ${inp3} end end,0)+SN(case when BaseRowId()=4 then case when ${inp4}=0 then [Column 3] else ${inp4} end end,0)) as [Discount Price] Link to comment Share on other sites More sharing options...
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