Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Make changes in a field based in other field from a no directly connected table

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





3 Replies
Not applicable
Author

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



brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

its easy, you have to join the tables, then you can use if-then-else-statement.

Not applicable
Author

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