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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Creating table with date column with month and year based on other columns

I want to create a fact table in which I show contracts (Contractnummer), which has a valid from (Contract vanaf) and valid to (Contract tot) date with a component (Component) within that contract, which also has a valid from (Prijs vanaf) and valid to (Prijs tot) date, and the amount (Bedrag) that corresponds to the component. This table looks like this:

Luukvg_0-1619616981579.png

In this table, I want to create a column which shows all months and years in which both the contract and the component are active. Hence, I am looking for all months and years between the latest date of Contract vanaf and Prijs vanaf and the earliest date of Contract tot en Prijs tot for each contract and component. This should then look like:

Luukvg_1-1619617599184.png

I want to have a similar table as above but then using DAX

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,not very clear. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

But I think the attached file after signature or the blog I sharing can help

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous ,not very clear. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

But I think the attached file after signature or the blog I sharing can help

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

The way you use CROSSJOIN in your example has helped me in solving my problem. Thanks again!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.