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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Flavio2021
Frequent Visitor

Difference between date from difference table with filter

Hi 

even if some example are present I am not yet able to do the difference of date between two table, keeping the last valide value

 

As you can seen in the picture I would like made the difference of date between the date of when has been created an assistance and the last valid technical action (closed date) on the second table. The table Elevation  has 4 value, but only "remote support" and "on site" must be considerate.

 

Thank you in advance who can show how to do, using  my example

 

pbix and source data available here 

 

here print scree about result desiderated 

Flavio2021_0-1717484243992.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Flavio2021 ,

 

Create measure.

MEASURE =
VAR _max_date =
    CALCULATE (
        MAX ( 'Elevate'[Close on] ),
        FILTER (
            ALL ( Elevate ),
            'Elevate'[Ticked ID] = MAX ( 'Elevate'[Ticked ID] )
                && ( 'Elevate'[Activity] = "On site"
                || 'Elevate'[Activity] = "Remote Support" )
        )
    )
RETURN
    DATEDIFF ( MAX ( 'Ticket'[Created On] ), _max_date, DAY )

vkaiyuemsft_0-1717553510837.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

1 REPLY 1
Anonymous
Not applicable

Hi @Flavio2021 ,

 

Create measure.

MEASURE =
VAR _max_date =
    CALCULATE (
        MAX ( 'Elevate'[Close on] ),
        FILTER (
            ALL ( Elevate ),
            'Elevate'[Ticked ID] = MAX ( 'Elevate'[Ticked ID] )
                && ( 'Elevate'[Activity] = "On site"
                || 'Elevate'[Activity] = "Remote Support" )
        )
    )
RETURN
    DATEDIFF ( MAX ( 'Ticket'[Created On] ), _max_date, DAY )

vkaiyuemsft_0-1717553510837.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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