5 Replies Latest reply on Mar 7, 2016 4:05 PM by gogineni vishal

    Single dashboard ,switching data sources using java script?

    gogineni vishal

      Hi ,

       

      I have created a single dashboard using a single data source ( A) . I have two more data sources B and C { They also have same rows and columns names but different names ,scores ,etc ie only numerical values change } .

       

      I would like to publish dashboard A into the server and then use java script  API to display in the web page.

       

      I would like to create different privileges to various users and then make them access dashboards which is possible in web page.

       

      However, Can i switch data sources in java script and be able to reflect in the views ? If so , Could you please tell how ?

       

      Sorry guys . I feel this is a complex problem and had to tag you in this. Please help .Pooja GandhiJonathan DrummeyShawn WallworkAnna LytvynBill Lyons@

        • 1. Re: Single dashboard ,switching data sources using java script?
          Bill Lyons

          No, I do not believe that is possible. You can change views, but not the data source for a view. Sorry.

           

          I recommend a union of the various sources, along with a new field identifying the source. Then, have your Javascript filter for that new field value.

           

          I hope that helps.

          2 of 2 people found this helpful
          • 2. Re: Single dashboard ,switching data sources using java script?
            gogineni vishal

            Thank you Bill for your swift response.

             

            Joining 3 different data sources with millions of records ? and that too after creating a dashboard . Would you think it would be possible to go smoothly? I just tried to join a new table to the existing data source in tableau using left outer join and it took about 6 hours and got stuck.

             

            Lets us assume if I join then wont the performance of the dashboard get affected? Since a lot of filters have been applied.

             

            Apart from it , I have a complex thing where I would have to create custom Titles or images(logo's) according to the organisation name.

             

            Also

            Can logo's be dynamically change according to the values selected?

            • 3. Re: Single dashboard ,switching data sources using java script?
              Bill Lyons

              Just to be clear, I said UNION, not JOIN. They are very different things.

               

              However, if each source has millions of records, an performance is already an issue, then the UNION option is probably not viable. However a lot of that depends on your data source configuration, indexes, performance, etc., and what you consider "acceptable" performance. I have some views that regularly query 30 million+ rows in SQL Server, with 8 charts in a dashboard. They take about 20 seconds to load, which would be unacceptable if you were looking at it several times per day. But since it is used about once per month, we call that "acceptable."

               

              If performance is unacceptable, you can consider pre-aggregating at the data source, or revert back to separate data sources. With separate data sources, you will need to have a separate viz for each.

               

              As for dynamically changing logos, I recommend viewing Sheet Swap and Pop in Tableau on Vimeo. I use this technique to swap logos all the time.

               

              I hope that helps.

              2 of 2 people found this helpful
              • 4. Re: Single dashboard ,switching data sources using java script?
                Tharashasank Davuluru

                Hi Vihsal ,

                 

                Try to union all the data sources you have.

                 

                If you think that you will have performance problem then apply some aggregation on your data source . Or else custom sql would be one option for you to get the results. But with custom sql also you will have some performance problems.

                 

                Pre -aggregation of data on data sources will help you to get rid  of some performance issues.

                2 of 2 people found this helpful
                • 5. Re: Single dashboard ,switching data sources using java script?
                  gogineni vishal

                  Thank you tharashasank. I would have to unionise the data sources. Thank you