Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello Everyone,
How can I join two dimension tables (Claim Current and Claim History) in Power BI using a common key. Then we need join to the fact table such that the Transaction date is between the effective from and to dates from the History Table.
eg. current.commonkey = history.commonkey and fact.transactiondate between history.effectiveFrom and history.effectiveTo
Is it possible to do this in PowerBI, instead of Source
Solved! Go to Solution.
Make sure that the history table has a unique identifier for each row. If it doesn't already, use Power Query to add an index column.
Link the current table to the history table in a one-to-many relationship.
Create a calculated column in the fact table to get the appropriate index from the history table
History Index =
SELECTCOLUMNS (
FILTER (
'History',
'History'[Common Key] = 'Fact'[Common Key]
&& 'History'[Effective From] <= 'Fact'[Transaction Date]
&& (
ISBLANK ( 'History'[Effective To] )
|| 'History'[Effective To] >= 'Fact'[Transaction Date]
)
),
"@value", 'History'[Index]
)
Then link History[Index] to Fact[History Index] in a one-to-many relationship.
Hi @ADosani
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @ADosani
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Make sure that the history table has a unique identifier for each row. If it doesn't already, use Power Query to add an index column.
Link the current table to the history table in a one-to-many relationship.
Create a calculated column in the fact table to get the appropriate index from the history table
History Index =
SELECTCOLUMNS (
FILTER (
'History',
'History'[Common Key] = 'Fact'[Common Key]
&& 'History'[Effective From] <= 'Fact'[Transaction Date]
&& (
ISBLANK ( 'History'[Effective To] )
|| 'History'[Effective To] >= 'Fact'[Transaction Date]
)
),
"@value", 'History'[Index]
)
Then link History[Index] to Fact[History Index] in a one-to-many relationship.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
55 | |
38 | |
31 |
User | Count |
---|---|
71 | |
64 | |
62 | |
50 | |
46 |