Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

5 Replies
Not applicable
Author

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

Not applicable
Author

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?

Not applicable
Author

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

Not applicable
Author

Even though I couldn't open the document (my computer doesn't let me validate the license, so I'm currently using Personal Edition), I spoke with direction and they decided to create a third field to link data.

I'm still curious though, isn't there a way to use something like sum(<Business_Name={Business_Budget}> Income)?

Not applicable
Author

I am not sure if that would work coz expressions are calculated over dimensions and you are working with two.

Regards

Rahul