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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
cruzp
Helper V
Helper V

Previous and Current Date Value Comparison

Hello PBI folks, 

 

I have a data in PBI that contains snapshots including movements of specific projects from the start up to date.

I want to have a comparison value that is based on what dates are selected in the two date slicers:

  • Old Value Date Slicer
  • New Value Date Slicer

Is there a way to transform the current table below into my expected output?

 

See sample project below:

 

Current table in PBI

cruzp_0-1725423552691.png

The expected output for this sample project I want to achieve will be exactly like this:

cruzp_1-1725423598711.png

 

Sample report is here:

https://www.dropbox.com/scl/fi/u0lm11smcrigr1zbiqw8k/sample.pbix?rlkey=78sv2o3o0h04obh6sutspw9lm&st=...

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @cruzp 

 

Please create measures.

 

Stage = 
CALCULATE(
        SELECTEDVALUE('Table'[STAGE_NAME]),
        FILTER(
            ALL('Table'),
            'Table'[DATE] = MAX('New Date'[new date])
        )
)

 

Old Value = 
CALCULATE(
    MAX('Table'[STAGE_NAME]),
    FILTER(
        ALL('Table'),
        'Table'[DATE] = MIN('Old Date'[Old date])
    )
)

 

New Value = 
CALCULATE(
    MAX('Table'[STAGE_NAME]),
    FILTER(
        ALL('Table'),
        'Table'[DATE] = MAX('New Date'[new date])
))

 

Here is the result.

 

vnuocmsft_0-1725608237032.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

4 REPLIES 4
Anonymous
Not applicable

Hi @cruzp 

 

Please create measures.

 

Stage = 
CALCULATE(
        SELECTEDVALUE('Table'[STAGE_NAME]),
        FILTER(
            ALL('Table'),
            'Table'[DATE] = MAX('New Date'[new date])
        )
)

 

Old Value = 
CALCULATE(
    MAX('Table'[STAGE_NAME]),
    FILTER(
        ALL('Table'),
        'Table'[DATE] = MIN('Old Date'[Old date])
    )
)

 

New Value = 
CALCULATE(
    MAX('Table'[STAGE_NAME]),
    FILTER(
        ALL('Table'),
        'Table'[DATE] = MAX('New Date'[new date])
))

 

Here is the result.

 

vnuocmsft_0-1725608237032.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.

 

 

Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1725507509421.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @cruzp 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

“Table”

vnuocmsft_0-1725504352766.png

 

Create new tables.

 

The date table is used to create the slicer.

 

Old Date = SELECTCOLUMNS('Table', "Old date", 'Table'[DATE])

 

New Date = SELECTCOLUMNS('Table', "new date", 'Table'[DATE])

 

Here is the result table.

 

Result Table = 
SUMMARIZE(
    'Table',
    "Project Code",
    SELECTEDVALUE('Table'[PROJECT_BK]),
    "Stage",
    CALCULATE(
        SELECTEDVALUE('Table'[STAGE_NAME]),
        FILTER(
            ALL('Table'),
            'Table'[DATE] = MAX('New Date'[new date])
        )
    ),
    "Start Date",
    SELECTEDVALUE('Table'[START_DATE]),
    "End Date",
    SELECTEDVALUE('Table'[END_DATE]),
    "Old Value",
     CALCULATE(
        SELECTEDVALUE('Table'[STAGE_NAME]),
        FILTER(
            ALL('Table'),
            'Table'[DATE] = MIN('Old Date'[Old date])
        )
    ),
    "New Value",    
     CALCULATE(
        SELECTEDVALUE('Table'[STAGE_NAME]),
        FILTER(
            ALL('Table'),
            'Table'[DATE] = MAX('New Date'[new date])
        )
    )
)

 

Here is the result.

 

vnuocmsft_1-1725504571558.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.

Hi @Anonymous thanks for the suggestion. is there a way to have it without using summarize table? like a more straight forward approach? because i will be adding more columns in the table

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors