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
elsys1
New Member

create table with date range for each item

Hello.

I have a table with items and data range, and I need to create a table in dax that contains dates by month for every item in fist table

The first table looks like it:

ItemStart DateEnd Date
Item101.01.201529.07.2024
Item226.03.2020

02.04.2029

Item313.01.202103.04.2026

 

And I need a table which looks like it:

ItemDate
Item 101.2015
Item 102.2015
Item 103.2015
Item 1
Item 107.2024
Item 203.2020
Item 2
Item 204.2029

 

Thanks for any help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @elsys1 ,

Based on my testing, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1722333330211.png

2.Open the power query editor, select add custom column.

vjiewumsft_1-1722333342390.png

3.Enter the following formula.

List.Select( List.Dates([Start Date],Duration.TotalDays([End Date]-[Start Date]),#duration(1,0,0,0)), each Date.Day(_)=1)

vjiewumsft_2-1722333357125.png

4.Select ok and expand the rows. The result is shown below.

vjiewumsft_3-1722333363069.png

vjiewumsft_4-1722333369208.png

5.Right click start date and end date column, select remove.

vjiewumsft_5-1722333379814.png

vjiewumsft_6-1722333386415.png

You can also view the following link to learn more information.

Solved: Re: Spread revenue across period based on start an... - Microsoft Fabric Community

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @elsys1 ,

Based on my testing, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1722333330211.png

2.Open the power query editor, select add custom column.

vjiewumsft_1-1722333342390.png

3.Enter the following formula.

List.Select( List.Dates([Start Date],Duration.TotalDays([End Date]-[Start Date]),#duration(1,0,0,0)), each Date.Day(_)=1)

vjiewumsft_2-1722333357125.png

4.Select ok and expand the rows. The result is shown below.

vjiewumsft_3-1722333363069.png

vjiewumsft_4-1722333369208.png

5.Right click start date and end date column, select remove.

vjiewumsft_5-1722333379814.png

vjiewumsft_6-1722333386415.png

You can also view the following link to learn more information.

Solved: Re: Spread revenue across period based on start an... - Microsoft Fabric Community

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Thennarasu_R
Responsive Resident
Responsive Resident

Hi @elsys1 

For your scenarios, you can use fill-down with formula,try this one you can able get the out put

New Value =
VAR LastNonBlankDate =
    CALCULATE (
        LASTNONBLANK ( TableName[Date], 1 ),
        FILTER (
            ALL ( TableName ),
            TableName[Date] <= EARLIER ( TableName[Date] )
                && NOT ( ISBLANK ( TableName[Value] ) )
        )
    )
RETURN
    CALCULATE (
        SUM ( TableName[Value] ),
        FILTER ( ALL ( TableName ), TableName[Date] = LastNonBlankDate )
    )

Thanks,
Thennarasu R 

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.