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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ruidi1126
Frequent Visitor

Dynamic Timestamp Visualization

Hi,

 

In my raw data, I have a few timestamps from a process as below. Is there any visualization in Power BI that allows a user to pick any two date points and the visualization will show the number of dates spent between the two points?

 

Date 1Date 2Date 3Date 4 Date 5
     
     
     

 

Thanks,

Rui

1 ACCEPTED SOLUTION
v-nuoc-msft
Community Support
Community Support

Hi @ruidi1126

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1713232356758.png

 

You can select any two dates by creating a Vertical List slice.

 

vnuocmsft_1-1713232673493.png

 

 

vnuocmsft_2-1713232742225.png

 

vnuocmsft_3-1713232912852.png

You can calculate the number of days between selected dates by creating a measure.

 

Date Interval = 
var _mindate = MIN('Table'[Date])
var _maxdate = MAX('Table'[Date])
RETURN IF(ISFILTERED('Table'[Date]),DATEDIFF(_mindate, _maxdate, DAY), BLANK())

 

 

Here is the result.

 

vnuocmsft_4-1713233014435.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

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

1 REPLY 1
v-nuoc-msft
Community Support
Community Support

Hi @ruidi1126

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1713232356758.png

 

You can select any two dates by creating a Vertical List slice.

 

vnuocmsft_1-1713232673493.png

 

 

vnuocmsft_2-1713232742225.png

 

vnuocmsft_3-1713232912852.png

You can calculate the number of days between selected dates by creating a measure.

 

Date Interval = 
var _mindate = MIN('Table'[Date])
var _maxdate = MAX('Table'[Date])
RETURN IF(ISFILTERED('Table'[Date]),DATEDIFF(_mindate, _maxdate, DAY), BLANK())

 

 

Here is the result.

 

vnuocmsft_4-1713233014435.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

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

 

 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.