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
ThomasWeppler
Super User
Super User

Selected a date every x months

Hi Power BI community

 

I have a table with five columns

 

1. Index: An index column

2. Assignment: A Number column that shows diffrent assignment. (In this example we will just look at [Assignment] = 1)

3. Date: A date colum that shows each date from today and the next three years

4. Firstdate: A date colum that shows which day an assingment started. (So in this example where we just look at one assingnment we will have the same date in each row)
5. Interval: A text colum that shows how often an assingment should be done. (It could be "3months" or "4months" or "6months" or anyother number between 1 and 12 followed by months.

 

I want to add a new column that shows 1 if the [Date] is equal to the [Firstdate] and if the [Date] is equal to [Firstdate] + a number of months equal to the periode in the Interval column.

This thread is very similar to this thread: https://community.fabric.microsoft.com/t5/Power-Query/Selecting-a-date-every-x-week/m-p/3270563#M105...
Where the problem was solved for weeks, but this solution doesn't work for months unfortunately.


I really hope someone can give me a hit on what my next step should be. All help is greatly appreciated.

1 ACCEPTED SOLUTION
grazitti_sapna
Super User
Super User

Hi @ThomasWeppler 

You can try using 

Flag =
IF (
    [Assignment] = 1
        && (
            [Date] = [Firstdate]
            || (
                [Date] = EDATE ( [Firstdate], INT ( MID ( [Interval], 1, FIND ( "month", [Interval] ) - 1 ) ) )
                    && DAY ( [Firstdate] ) <= DAY ( [Date] )
            )
        ),
    1,
    0
)

 

Thank you. Hope this will help

View solution in original post

1 REPLY 1
grazitti_sapna
Super User
Super User

Hi @ThomasWeppler 

You can try using 

Flag =
IF (
    [Assignment] = 1
        && (
            [Date] = [Firstdate]
            || (
                [Date] = EDATE ( [Firstdate], INT ( MID ( [Interval], 1, FIND ( "month", [Interval] ) - 1 ) ) )
                    && DAY ( [Firstdate] ) <= DAY ( [Date] )
            )
        ),
    1,
    0
)

 

Thank you. Hope this will help

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.