Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 --> | Bar | Restaurant | Hotel | Pub |
---|---|---|---|---|
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.
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
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
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?
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
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)?
I am not sure if that would work coz expressions are calculated over dimensions and you are working with two.
Regards
Rahul