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
Anonymous
Not applicable

Using user input to select columns for column datetime difference calculations and visualisation

Hi there

 

I'm currently working with some data where each row represents a unit ID and the rest of the columns (around 10 of them) are datetime columns. Each of these datetime columns represent a timestamp at a specific point in a process flow.  I would love to have the end-user being able to choose two of these 10 columns (could be from slicers) and then get the visualisations filtered based on the timedifference between these two datetime columns that the user has selected.

 

I know I could create calculated difference columns for each n(n-1)/2 combinations and make a tab with visualisations for each of the combinations but I would just think there would be a better way so that it could all be done in one tab with only the column filters. There might also be some way to transform the data to fit my needs but I simply can't find any way which doesn't require me to create a ton of measures and/or calculated columns.

 

I hope I'm clear enough in my explanation, and thanks in advance for the help!

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , if this just filter not the axis. You can follow the measure slicer approach. Create a table with 10 date time names (use as Date name slicer) . Have an independent date table for the date slicer.

 

Now based on date selection and date range in slicer create a measure

 

 

refer

https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

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

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.