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

Join 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.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.