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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Based on Datetime difference between current row and previous row, display an alert in dashboard

Hi Everyone,

 

I need to get datetime difference between current row and previous row.

Eg: 2nd row - 1st row, 3rd row - 2nd row, 4th row - 3rd row and so on

If the time difference is greater than 10 mins, It need to show an alert in the dashboard like a pop up or in card. My datetime column looks like

 

powerbi1.jpg

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Anonymous 

 

You may add an index column in query editor.Then you may create below measures to filter the table visual to pop up the value.For further,please refer to attached file.

Previous_DateTime =
CALCULATE (
    SUM ( Table2[DateTime] ),
    FILTER ( ALL ( Table2 ), Table2[Index] = MAX ( Table2[Index] ) - 1 )
)
Timediff = IF(NOT(ISBLANK([Previous_DateTime])),DATEDIFF([Previous_DateTime],SUM(Table2[DateTime]),MINUTE ))
Filter = IF([Timediff]>10,1)

1.png

 

Regards,

Cherie

 

Community Support Team _ Cherie 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
v-cherch-msft
Employee
Employee

Hi @Anonymous 

 

You may add an index column in query editor.Then you may create below measures to filter the table visual to pop up the value.For further,please refer to attached file.

Previous_DateTime =
CALCULATE (
    SUM ( Table2[DateTime] ),
    FILTER ( ALL ( Table2 ), Table2[Index] = MAX ( Table2[Index] ) - 1 )
)
Timediff = IF(NOT(ISBLANK([Previous_DateTime])),DATEDIFF([Previous_DateTime],SUM(Table2[DateTime]),MINUTE ))
Filter = IF([Timediff]>10,1)

1.png

 

Regards,

Cherie

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks @v-cherch-msft , It works

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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