Forum Discussion
Conditional merge/add custom colum with table
- 5 years ago
Ok, i think i finally understood what you meant.. I now did this:
- Combined dim_project and dim_company to one single table. In this table i made new ID keys which consisted of projectnumber for projects and company nr for companies.
- In fact table i made a new column and then used dax code to make this same id_key, so for some companies ID key was projectnumber and for other companies ID key was company number.
I now have a relationship with all values, which was what i wanted, and the refresh on the dataset takes 15 seconds instead of 15 minutes 🙂
Now i just need to find out how i can combine relationships, which can change over time.. so that the releationship is different lets say in 2020 than it is in 2021...
I would construct the additional tables in Power Query. That way you can shape them dynamically (with the columns you need) and use them in the Power BI data model for your hierarchies.
Thank you but i have a little trouble to understand what it the outcome of this. Could you explain in more detail?
- How would this new tables look. Would there be new separate tables from the current fact and dim tables?
- Will there be one new table or more new tables?
- How will the fact table be connected to the new tables, to be able to put one filter on "business unit" in the reports?
Maybe hard to explain. If i send you my datafile could it be easier to show me?