Can you clarify what exactly happens when you try to drag calculation 1 onto the filter shelf? Does the shelf not get the orange square around it?
I downloaded your workbook and tried this and did not have an issue placing either calc on the filter shelf.
Thanks for getting back to me.
What I am trying to implement is decryption using R within Tableau. We have a parameter which contains encrypted values for Product Category. The two calculated fields are used for decryption. We are interested in Calculation1 because creating a calculation like calculation2 using if else statements is a tedious task.
It is clear that both return same data.
Problem comes when dragging them to filter shelf. When calculation2 is dragged we get True, False options. For calculation1 only False is displayed. If True is also displayed with calculation1, then we can assume that the problem is solved.
Drag Calculation2 to Filter.
Check True, Filter works
Drag Calculation1 to Filter.
The issue here is that your results from your decrypt function in R return a lot of garbled characters in addition to the decrypted word, so the result never directly equals the target Product Category:
Instead of setting them equal, you can look for one of the target Product Categories inside of the returned string:
dec=rawToChar(PKI::PKI.decrypt(b, "00112233445566778899aabbccddeeff", "AES-256"));
',[Parameter]), ATTR([Product Category]))
This correctly detects the target Category:
I've attached the workbook here.
I'm interested to learn a little bit more about your use-case though. Currently we are working on adding TLS encrypted connections for RServe, is this something that would potentially be useful for you?
Book-AES-IF (1).twbx 157.3 KB
Thanks a lot Nathan Mannheimer
I think it takes more time to filter as calculation returns lot of symbols. But it works. I need to publish it on tableau server.
I had asked a question regarding integration of Tableau server and Rserve. Let me add it to Tableau External Services.
Don't know from where these characters are added to the decrypted data. If we execute the same code in R, it returns actual data without any special symbols.
Do you have any idea ?
I'm not familiar with the package you are using for encryption, so unfortunately I'm not sure exactly what's happening here. It may be that there are some extra bits in the packages that are sent over the network that Tableau is attempting to translate when the visualization is rendered.