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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Dhamu_114
New Member

Date Diff Between Selected Ranges on Slicer

Hi,

 

I need to get the Number of days between the date ranges selected by user. Based on the number of days, Utilization will be calculated.

 

Date Slicer

Q1.jpg

 

Based on the selection, I managed to get the starting date and ending date. The calculation column used for these things are

 

Q2.jpg

For getting intial date.

 

Q3.jpg

For getting End Date.

 

But when i tried to get the date difference between these selected values, am facing issues. The date difference returns 0, Where I should get difference as 9 days.

 

The formula used for caluculating DateDiff is

Q4.jpg

 

THE OUTPUT I GOT IS

Q5.jpg

 

It will be great if someone help me in achieving this. Thanks In Advance.

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@Dhamu_114

 

What are the results if you simply use

 

=
DATEDIFF ( MIN ( 'table'[date] ), MAX ( 'table'[date] ), DAY )

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.