Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm having this problem:
There are three tables, a fact table and 2 dimensions connected to each other like this.
Fact:
Load Flag ,X,Y ,etc
From Fact.qvd
Dimension1:
Load X, Z ,etc…
From Dimension1.qvd
Dimension2:
Load Z, W ,etc
From Dimension2.qvd
Fact table and Dimension1 are directly connected by field X and Dimension1 is connected with Dimension2 by the field Z. However, I want to make changes in the field W from Dimension2 table if Flag field from Fact table is equal to 1.
Can anyone please help me with this? I don't know how to do it since Fact table and Dimension2 table are not directly connected and don't have fields in common.
Thanks in advance,
Mariana
Anyone has tips? I'm really struggling with this problem.
The exact problem is that the field Flag from fact table indicates if it is an online or a direct sale. If it is online (Flag = 1), I have to make a change in field W from Dimension2 table. The field W is the Employee name and when Flag = 1, the employee name needs to be substituted by 'Website sale'. The Dimension2 table has Employees and the direct report person and I need to create a hierarchy but the Website Sales need to be reflected in the Employee hierarchy.
Can anyone help me??
Thanks in advance,
Mariana
Hi,
its easy, you have to join the tables, then you can use if-then-else-statement.
Hi,
Thank you for your answer.
You're suggesting to join the dimension tables with each other or with the fact table?
I'm not sure if I understood what you said, because I can only apply an if, then, else if I had all the fields in the same table, right? And joining with a fact table doesn't seem to be the most correct way to do it. Besides, I could not build the hierarchy of Employees…
Could you please explain better what you're suggesting?
Thanks,
Mariana