
1. Re: 3D charts by Bora Beran Tableau don't work
Bora Beran Nov 22, 2016 12:00 AM (in response to Helena Borski)Hi Helena,
I just opened the workbook with no issues. What version of Tableau are you using?
Thanks,
Bora

2. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 23, 2016 3:16 PM (in response to Bora Beran)Do I receive the response to my problem? I would appreciate it

3. Re: 3D charts by Bora Beran Tableau don't work
Bora Beran Nov 23, 2016 4:24 PM (in response to Helena Borski)Would you be able to provide your workbook? I can't tell what the issue is without looking at it since it works without any issues on Tableau Public and on my computer.

4. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 23, 2016 11:06 PM (in response to Bora Beran)I am looking for the following items:
1) How did you create the xrotated or yrotated?2) Where did you enter your SQL statement?3) Do I need to create the parameter or the calculation field to 3d chart?
I prefer to find the problem on my own to learn. Could you give me a principle about the xrotated or xzrotated in Tableau?
Thank you in advance

5. Re: 3D charts by Bora Beran Tableau don't work
Bora Beran Nov 24, 2016 2:04 AM (in response to Helena Borski)Except the 3D with Axis sheet you don't need to write any custom SQL. Custom SQL is used to add the axis and grid on top of an existing table of data.
xrotated, yrotated are calculated fields. Those are calculated fields, you can right click > Edit to take a look at their definitions. They are doing the transformations listed here Rotation matrix  Wikipedia
Parameters are for choosing the rotation angle. You can hard code them if you don't want to give consumers of the dashboard a way to interact with it and rotate as they wish.
~ Bora

6. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 24, 2016 7:54 AM (in response to Bora Beran)Could you give me an example of xrotated calculation instead of giving me the definition from Wikipedia? :)Could you give me an example of parameters for choosing the rotation angel?Could you give me some tips how can I incorporate your custom SQL to any other data set? What areas do I need to change?
Thank you in advance!

7. Re: 3D charts by Bora Beran Tableau don't work
Bora Beran Nov 26, 2016 1:37 AM (in response to Helena Borski)Hi Helena,
To get x rotated you need two calculations.
First step is this calculation:
Calculation1 that takes original xy coordinates from the table and multiplies by sin and cos of the chosen rotation angle via parameter
[x]*COS([XY  Angle (Radians)])[y]*SIN([XY  Angle (Radians)])
Second one takes this calculation and does another similar transformation
[Calculation1]*COS([XZ  Angle (Radians)])[z]*SIN([XZ  Angle (Radians)])
The math is the matrix algebra shown in the article I shared earlier written as calculated fields.
If you have a table with the same exact structure, inside the same workbook, you can go to edit connection, drag that table in then copypaste the custom SQL as is. If your table has the same structure but has a different name just replace the name references. E.g. if instead of 3d.csv it was called ad.csv you need to do a replace all in a text editor to swap ad#csv for all occurrences of 3d#csv and resulting custom SQL would look like this.
The first portion of select is all columns from the table. It just adds another column to indicate these are the points.
The other ones draw the background frame hence have different types like Surface, Axis, Grid etc. XTop, XBottom etc. parameters are used to set the size of the background so if you want the box drawn around the points larger or smaller you can tweak those values in Tableau. Multipliers like 0.33 and 0.66 are to create equal size grid cells.
SELECT [ad#csv].[id] AS [id], 'Points' as [Type],
[ad#csv].[x] AS [x],
[ad#csv].[y] AS [y],
[ad#csv].[z] AS [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Surface1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YTop> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Surface1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '3' as [id], 'Surface1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '4' as [id], 'Surface1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YTop> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '5' as [id], 'Surface1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YTop> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Surface2' as [Type],
<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Surface2' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '3' as [id], 'Surface2' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '4' as [id], 'Surface2' as [Type],
<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '5' as [id], 'Surface2' as [Type],
<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Surface3' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Surface3' as [Type],
<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '3' as [id], 'Surface3' as [Type],
<Parameters.XBottom> as [x],
<Parameters.YTop> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '4' as [id], 'Surface3' as [Type],
<Parameters.XTop> as [x],
<Parameters.YTop> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '5' as [id], 'Surface3' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis2_Grid1' as [Type],
0.33*<Parameters.XTop> + 0.66*<Parameters.XBottom> as [x],
<Parameters.YTop> as [y],
<Parameters.ZTop> as [z], 0.33*<Parameters.XTop> + 0.66*<Parameters.XBottom> as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis2_Grid1' as [Type],
0.33*<Parameters.XTop> + 0.66*<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis2_Grid2' as [Type],
0.66*<Parameters.XTop> + 0.33*<Parameters.XBottom> as [x],
<Parameters.YTop> as [y],
<Parameters.ZTop> as [z], 0.66*<Parameters.XTop> + 0.33*<Parameters.XBottom> as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis2_Grid2' as [Type],
0.66*<Parameters.XTop> + 0.33*<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis1_Grid1' as [Type],
<Parameters.XBottom> as [x],
0.66*<Parameters.YTop> + 0.33*<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], 0.66*<Parameters.YTop> + 0.33*<Parameters.YBottom> as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis1_Grid1' as [Type],
<Parameters.XTop> as [x],
0.66*<Parameters.YTop> + 0.33*<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis1_Grid2' as [Type],
<Parameters.XBottom> as [x],
0.33*<Parameters.YTop> + 0.66*<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], 0.33*<Parameters.YTop> + 0.66*<Parameters.YBottom> as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis1_Grid2' as [Type],
<Parameters.XTop> as [x],
0.33*<Parameters.YTop> + 0.66*<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis3_Grid1' as [Type],
<Parameters.XTop> as [x],
0.66*<Parameters.YTop> + 0.33*<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis3_Grid1' as [Type],
<Parameters.XTop> as [x],
0.66*<Parameters.YTop> + 0.33*<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis3_Grid2' as [Type],
<Parameters.XTop> as [x],
0.33*<Parameters.YTop> + 0.66*<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis3_Grid2' as [Type],
<Parameters.XTop> as [x],
0.33*<Parameters.YTop> + 0.66*<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis4_Grid1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YTop> as [y],
0.66*<Parameters.ZTop> + 0.33*<Parameters.ZBottom> as [z], 0.66*<Parameters.ZTop> + 0.33*<Parameters.ZBottom> as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis4_Grid1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
0.66*<Parameters.ZTop> + 0.33*<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis4_Grid2' as [Type],
<Parameters.XTop> as [x],
<Parameters.YTop> as [y],
0.33*<Parameters.ZTop> + 0.66*<Parameters.ZBottom> as [z], 0.33*<Parameters.ZTop> + 0.66*<Parameters.ZBottom> as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis4_Grid2' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
0.33*<Parameters.ZTop> + 0.66*<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis5_Grid1' as [Type],
0.33*<Parameters.XTop> + 0.66*<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis5_Grid1' as [Type],
0.33*<Parameters.XTop> + 0.66*<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis5_Grid2' as [Type],
0.66*<Parameters.XTop> + 0.33*<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZTop> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis5_Grid2' as [Type],
0.66*<Parameters.XTop> + 0.33*<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis6_Grid1' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
0.66*<Parameters.ZTop> + 0.33*<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis6_Grid1' as [Type],
<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
0.66*<Parameters.ZTop> + 0.33*<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '1' as [id], 'Axis6_Grid2' as [Type],
<Parameters.XTop> as [x],
<Parameters.YBottom> as [y],
0.33*<Parameters.ZTop> + 0.66*<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]
UNION ALL
SELECT '2' as [id], 'Axis6_Grid2' as [Type],
<Parameters.XBottom> as [x],
<Parameters.YBottom> as [y],
0.33*<Parameters.ZTop> + 0.66*<Parameters.ZBottom> as [z], '' as [Label]
FROM [ad#csv]

8. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 27, 2016 3:53 PM (in response to Bora Beran)Thank you for your feedback.
I was trying to set up the rotated calculation 1 but all look good until the end of the calculation says: Expected closing parenthesis or comma while parsing argument list for COS
COS([XY  Angle (Radians))[y]SIN() Your original was: COS()[y]SIN() I need to remove ] after Radians because Tableau underlying the entire calculation with your original example. I marked the removed part on the red color
What can I do that? I don't have a problem with a matrix math but the problem is how I can the matrix math incorporates to my calculation in Tableau

9. Re: 3D charts by Bora Beran Tableau don't work
Bora Beran Nov 28, 2016 12:53 AM (in response to Helena Borski)You have some typos. For example [XY  Angle (Radians)] is a field name and needs to be written between square brackets but in your calculation, square bracket is missing.
COS([XY  Angle (Radians))[y]SIN()
Corrected version
COS([XY  Angle (Radians)])[y]*SIN([XY  Angle (Radians)])
If you don't mind me asking, why did you prefer, typing in new formulas, instead of reusing existing ones using copypaste etc.?
I know quite a few other Tableau users, that use the formula as is.
Thanks,
Bora

10. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 28, 2016 10:50 AM (in response to Bora Beran)I am using a different variables in place of X and Y
When I want to reuse your full x rotated then the system says X is not defined
Sent from my iPhone

11. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 28, 2016 11:38 PM (in response to Bora Beran)If I copy this then it doesn't work because is undefined field
Any Thoughts?

12. Re: 3D charts by Bora Beran Tableau don't work
Bora Beran Nov 29, 2016 8:01 PM (in response to Helena Borski)You can copypaste then replace the name of the fields without removing the square brackets or rename your fields and then copypaste the calculated fields. It should work either way.

13. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 29, 2016 8:15 PM (in response to Bora Beran)I did but the system doesn't like the closing statement "]"
Sent from my iPhone

14. Re: 3D charts by Bora Beran Tableau don't work
Helena Borski Nov 29, 2016 8:34 PM (in response to Bora Beran)Could you double check your z rotated again?
I am sure is some error because I copy and past to Tableau and it doesn't work
Sent from my iPhone