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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
DocDri
Helper I
Helper I

Get overview of shifted project end dates

Hello,

 

I have the following challenge, where I need some help:

I have a table with project data (values, end-date) for different reporting periods like this

 

project | period | valueX | value Y | end-date (YYYY.MM)
A | 2024.12 | 10 | 20 | 2025.01
A | 2025.01 | 15 | 27 | 2025.01
A | 2025.02 | 14 | 27 | 2025.01
A | 2025.03 | 15 | 20 | 2025.09
B | 2024.12 | 40 | 10 | 2025.07
B | 2025.01 | 40 | 10 | 2025.07
B | 2025.02 | 50 | 10 | 2025.09
B | 2025.03 | 20 | 10 | 2025.01
C | 2024.12 | 80 | 12 | 2025.01
C | 2025.01 | 85 | 12 | 2025.03
C | 2025.02 | 86 | 12 | 2025.05
C | 2025.03 | 87 | 12 | 2025.08

 

I need an overview of all projects which had an end-date=2025.01 in period=2024.12 and if they have another end-date (if yes, which one) in the current period (could be 2025.1,2 or 3 in the example above).

 

Example: for current period = 2025.02 it should deliver the following table:

 

project | valueX | value Y | end-date old | end-date new
A | 10 | 20 | 2025.01 | null (no change of end-date)
C | 80 | 12 | 2025.01 | 2025.05


Many thanks for any help!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DocDri 

 

Thank you very much bhanu_gautam for your prompt reply.

 

For your question, here is the method I provided:

 

Create a new table.

 

OverviewTable = 
VAR CurrentPeriod = DATE(2025, 2, 1)
RETURN
FILTER(
    ADDCOLUMNS(
        FILTER(
            'Table',
            'Table'[period] = DATE(2024, 12, 1) && 'Table'[end-date] = DATE(2025, 1, 1)
        ),
        "end-date new", 
        IF(
            CALCULATE(
                MAX('Table'[end-date]),
                FILTER(
                    'Table',
                    'Table'[project] = EARLIER('Table'[project]) && 
                    'Table'[period] = CurrentPeriod
                )
            ) = DATE(2025, 1, 1),
            BLANK(),
            CALCULATE(
                MAX('Table'[end-date]),
                FILTER(
                    'Table',
                    'Table'[project] = EARLIER('Table'[project]) && 
                    'Table'[period] = CurrentPeriod
                )
            )
        )
    ),
    [end-date new] <> BLANK() || [end-date] = DATE(2025, 1, 1)
)

 

Here is the result.

 

vnuocmsft_0-1738639823174.png

 

Regards,

Nono Chen

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 @DocDri 

 

Thank you very much bhanu_gautam for your prompt reply.

 

For your question, here is the method I provided:

 

Create a new table.

 

OverviewTable = 
VAR CurrentPeriod = DATE(2025, 2, 1)
RETURN
FILTER(
    ADDCOLUMNS(
        FILTER(
            'Table',
            'Table'[period] = DATE(2024, 12, 1) && 'Table'[end-date] = DATE(2025, 1, 1)
        ),
        "end-date new", 
        IF(
            CALCULATE(
                MAX('Table'[end-date]),
                FILTER(
                    'Table',
                    'Table'[project] = EARLIER('Table'[project]) && 
                    'Table'[period] = CurrentPeriod
                )
            ) = DATE(2025, 1, 1),
            BLANK(),
            CALCULATE(
                MAX('Table'[end-date]),
                FILTER(
                    'Table',
                    'Table'[project] = EARLIER('Table'[project]) && 
                    'Table'[period] = CurrentPeriod
                )
            )
        )
    ),
    [end-date new] <> BLANK() || [end-date] = DATE(2025, 1, 1)
)

 

Here is the result.

 

vnuocmsft_0-1738639823174.png

 

Regards,

Nono Chen

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

 

 

bhanu_gautam
Super User
Super User

@DocDri , First create a intial table

Create a new table that filters the data for the initial period (2024.12) with end-date = 2025.01.

DAX
InitialPeriodTable =
FILTER(
YourTable,
YourTable[period] = "2024.12" && YourTable[end-date] = "2025.01"
)

 

Merge the InitialPeriodTable with the original table to get the current period data.

DAX
MergedTable =
SELECTCOLUMNS(
ADDCOLUMNS(
InitialPeriodTable,
"end-date new",
LOOKUPVALUE(
YourTable[end-date],
YourTable[project], InitialPeriodTable[project],
YourTable[period], "2025.02"
)
),
"project", [project],
"valueX", [valueX],
"value Y", [value Y],
"end-date old", [end-date],
"end-date new", [end-date new]
)

 

Create the final table to display the required columns.

DAX
FinalTable =
SELECTCOLUMNS(
MergedTable,
"project", [project],
"valueX", [valueX],
"value Y", [value Y],
"end-date old", [end-date old],
"end-date new", IF([end-date new] = BLANK(), "null", [end-date new])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.