-
1. Re: Need help with a Viz, two data sources with a calculation between them, oh and throw in a parameter for good measure
Joe OppeltJun 7, 2016 3:14 PM (in response to Andrew Pandolfino)
Vague question.
"Calculated field between the two..."
What does that mean? Are you trying to use data from the secondary source in a calc that resides in the first source? Are you trying to create a calculated field to use as the join field between the two?
Haywire ... Meaning ???
Really, a sample packaged workbook would help describe the issue better. Then you could say, "I need to use the longitude from secondary source in <this way> in calculation [XYZ] ..."
And I know you're working with military stuff, so I'm sure you have issues with proprietary data. So hack up bogus city names instead of military bases, and use GPS locations somewhere in the south pacific.
When you upload the packaged workbook, specify your Tableau version so we can all work on the same version.If you need ideas on anonymizing your workbook and data, check out the video here: Anonymize your Tableau Package Data for Sharing
-
2. Re: Need help with a Viz, two data sources with a calculation between them, oh and throw in a parameter for good measure
Andrew Pandolfino Jun 7, 2016 6:20 PM (in response to Joe Oppelt)There isn't anything secret here, all the bases are known. Here is a packaged workbook with the data and a description of what I am looking to do.
Thanks!!!
-
3. Re: Need help with a Viz, two data sources with a calculation between them, oh and throw in a parameter for good measure
Joe OppeltJun 8, 2016 11:40 AM (in response to Andrew Pandolfino)
I can't get that workbook to open. It just hangs on "Connecting to data source." Forever.
-
4. Re: Need help with a Viz, two data sources with a calculation between them, oh and throw in a parameter for good measure
Shawn Wallwork Jun 8, 2016 12:17 PM (in response to Joe Oppelt)Neither can I, and I even unpackaged it so I could point it at the tde. No luck. I personally think it's corrupted.
--Shawn
-
5. Re: Need help with a Viz, two data sources with a calculation between them, oh and throw in a parameter for good measure
Andrew Pandolfino Jun 8, 2016 12:52 PM (in response to Shawn Wallwork)Thanks guys for trying. I actually come up with another approach. Since I am only really concerned with points within 5 miles of each base I made a quick script to query the database using each base as a center and returning all the points within 5 miles.
SELECT latitude,longitude,distance FROM (
SELECT z.LATITUDE,z.LONGITUDE,69 * 57.2957795 * (ACOS(COS(0.0174532925 * (p.latpoint))
* COS(0.0174532925 * (z.latitude))
* COS(0.0174532925 * (p.longpoint - z.longitude))
+ SIN(0.0174532925 * (p.latpoint))
* SIN(0.0174532925 * (z.latitude)))) AS distance
FROM <TABLEINDB> z
JOIN (SELECT <LATOFBASE> AS latpoint, <LONGOFBASE> AS longpoint FROM DUAL) p ON 1=1
WHERE z.latitude BETWEEN p.latpoint - (34.5) AND p.latpoint + (34.5)
AND z.longitude BETWEEN p.longpoint - (2 / (69 * COS(0.0174532925 * (p.latpoint)))) AND p.longpoint + (2 / (69 * COS(0.0174532925 * (p.latpoint))))
)
WHERE distance <= 5
I write this to another flat file with the format:
Base_Name, Latitude of Point from db, Longitude of Point from db, Distance
This then makes it pretty easy to visualize. Tableau and Talend, my TNT!