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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Tuna123
Frequent Visitor

Combining two tables and filtering based on combined rows

I have two tables:

Date table		Data table			
Date		Product	Type	Start	End
1/2018		A	1	1/2019	1/2020
2/2018		A	2	1/2019	1/2021
3/2018		A	3	1/2020	1/2050
4/2018		B	1	1/2021	1/2022
5/2018		B	2	1/2022	1/2021
6/2018		B	3	1/2023	1/2021
7/2018		C	1	1/2018	1/2022
8/2018		C	2	1/2018	1/2022
9/2018		C	3	1/2021	1/2050
…		…	…	…	…

I'm trying to crossjoin the dates with product data  (product and type) into one table but I only need the date-product combinations when the product is "active" (between the start and end dates). Is there a way to do this?

 

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @Tuna123

 

This shall do it hopefully.

 

Add a new Table from Modelling Tab  as follows

CombinedTable =
GENERATE (
    'DataTable',
    FILTER (
        DateTable,
        DateTable[Date] >= 'DataTable'[Start]
            && DateTable[Date] <= 'DataTable'[End]
    )
)

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

Hi @Tuna123

 

This shall do it hopefully.

 

Add a new Table from Modelling Tab  as follows

CombinedTable =
GENERATE (
    'DataTable',
    FILTER (
        DateTable,
        DateTable[Date] >= 'DataTable'[Start]
            && DateTable[Date] <= 'DataTable'[End]
    )
)

Thanks @Zubair_Muhammad

 

This worked nicely.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.