Forum Discussion

asjones's avatar
asjones
Icon for Helper V rankHelper V
6 years ago

Creating a Relationship where the Fact row Must Between Two Values

I have to join two tables based on a few different attributes. I know I can do part of this by using Power Query and concatenating to fields. However the challenge is one of the dimensions varies based on a time frame in the format of a year/month.

 

Fact table

ClientDeptPeriodValue
AB10020190110
AB10020200220
ZY10020190530


Dimension Table

ClientDeptDivisionPeriod_FromPeriod_To
AB100Exec201901201904
AB100F&A201905202012
ZX100PRG201901202112

 

I can concatenate Client and Dept on both tables in Power Querty to do a Join but how do I handle if the Period column is in-between the Period_From and Period To in the Dimension table? I know how I would do this in a traditional SQL Join with a between statement but how do I create the relation in a Power BI Data Model?

 

Any ideas and thoughts?

 

thanks

Alan

 

 

2 Replies