Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
henrika
Frequent Visitor

Combine data that is valid for a period with data that is specific to a certain time

Hi,

 

I have a model where the main table has a monthly record per unit with several datacolumns like sketched below.

 

DateUnitData1Data2Data3DataN
01.11.2018A14710
01.12.2018A25811
01.11.2018B36912

 

Then there is a table which has some factors that is valid for a time period for the different units (e.g. as below).
What would be the best way to combine this so that I can iterate over the data in the main table and apply the factors of the other table?

The factortable could be expanded to months and they could be connected with a helpercolumn that consists of e.g. "Unit-Date", but that seems a bit excessive.
(e.g. TestCalc = SUMX(DataTable, DataTable[Data1] * RELATED(FactorTable[Factor_X])

StartTimeEndTimeUnitFactor_XFactor_YFactor_Z
 31.12.2017A111110
01.01.201831.12.2020A110100
01.01.2021 A210102
01.01.201931.12.2021B312110
01.01.2022 B111105


Thanks in advance for your consideration!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @henrika,

It sounds like you want to analysis with date ranges that define by multiple fields. for this scenario, I'd like to suggest you look at the following blog 'start, end date' parts if help:

Before You Post, Read This: start, end date  

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @henrika,

I'd like to suggest you to unpivot column on these date fields to convert to attribute and values, then you can simply write Dax expression and condition to filter on these unpivot date values.

Unpivot columns - Power Query | Microsoft Learn

Regards,

Xiaoxin Sheng

Hi @Anonymous and thanks for your reply!

Wouldn't that give me many rows from that DAX filtering if I should unpivot on the date columns? 
What about linking on "unit" and using your datefiltering like StartDate <= date && EndDate >= date. That could maybe get us a unique row. 

I won't have time to test today, but will test both ideas soon-ish.
Regards,
Henrik

Anonymous
Not applicable

Hi @henrika,

It sounds like you want to analysis with date ranges that define by multiple fields. for this scenario, I'd like to suggest you look at the following blog 'start, end date' parts if help:

Before You Post, Read This: start, end date  

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.