5 Replies Latest reply: Aug 2, 2012 5:34 AM by Rahul Lakhina RSS

    Same dimensions with different name

      Hi, I'm working on a database that I didn't build and there are two Business dimensions with different names buth with the same content, let's say: Business_Name and Business_Budget. Both have the same content: 'Bar', 'Restaurant', 'Hotel' and 'Pub'.

      The problem is that I need to buid a table with some expressions that require Business_Name, and some that require Business_Budget, something like this:

       

      Business_Budget  -->
      BarRestaurantHotelPub
      Nº of employees(This works with Business_Name)(This works with Business_Name)(This works with Business_Name)(This works with Business_Name)
      Average Employee Wage(Works with Business_Budget)(Works with Business_Budget)(Works with Business_Budget)(Works with Business_Budget)
      Days open(This works with Business_Name)(This works with Business_Name)(This works with Business_Name)(This works with Business_Name)
      Earnings(Works with Business_Budget)(Works with Business_Budget)(Works with Business_Budget)(Works with Business_Budget)

       

      As you can see, I need to choose either Business_Name or Business_Budget, so only half of the expressions work properly. I had thought of using a filter such as {<Business_Name={'Business_Budget'}>} since they both have the same names, but I can't seem to get it working. I appreciate any help.

        • Re: Same dimensions with different name
          Rahul Lakhina

          HI,

           

          Is there a particular reason why you do not want to rename one of the field at the script level? That would be the easiest solution! Or you can make a third field common to both the tables.

           

          If you do not like the idea of both the above left join on the Business Name and bring the consolidate  into one table. These are just probable solution however need to know the data structure to make the right choice.

           

          Best of Luck!!

           

          Regards

           

          Rahul

            • Re: Same dimensions with different name

              Hi Rahul, thank you for your answer. As I mentioned before, I didn't build the database and I've been told that they had to make two fields because they were having difficulties, so I prefer not to touch their script.

              I don't really understand your second suggestion, would you care to elaborate some more?

                • Re: Same dimensions with different name
                  Rahul Lakhina

                  Hi,

                   

                  Please see app attached. I have used a rather simple example to suggest three solutions:

                   

                  1. Use of calculsted dimension that should work with your current script.

                  2. Script level solution: Creating a third and common field to link data (this may not be an idea solution for you given we know that linking the two table may lead to unwanted joins)

                  3. Script Level Solution: Joining the values to one table (This will still be effective and will not lead to any join problems)

                   

                  Regards

                   

                  Rahul Lakhina