topic Measure to calculate the number of days between two dates in a date slider in Desktop
https://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/171047#M74673
<P>I have a date slicer, say values of 1/1/17 to 1/21/17. I would like a simple measure of the number of days between those two dates (i.e. 20). I want to used that measure to create a number of visuals based on the number of days selected in the slider. If it's 1/1/16 to 1/2/17, I want the measure to return 366 days. Hope this makes sense. Seems like it should be an easy one. Appreciate your help!!</P>Mon, 08 May 2017 02:32:33 GMTNew2BInow2017-05-08T02:32:33ZMeasure to calculate the number of days between two dates in a date slider
https://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/171047#M74673
<P>I have a date slicer, say values of 1/1/17 to 1/21/17. I would like a simple measure of the number of days between those two dates (i.e. 20). I want to used that measure to create a number of visuals based on the number of days selected in the slider. If it's 1/1/16 to 1/2/17, I want the measure to return 366 days. Hope this makes sense. Seems like it should be an easy one. Appreciate your help!!</P>Mon, 08 May 2017 02:32:33 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/171047#M74673New2BInow2017-05-08T02:32:33ZRe: Measure to calculate the number of days between two dates in a date slider
https://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/171076#M74684
<P>Hi <LI-USER uid="29571"></LI-USER></P><P> </P><P>Please try the following <STRONG>calculated measure</STRONG>. Just substitute the table/date column you are using in your slicer.</P><P> </P><PRE>Days Between = DATEDIFF(
MIN('Table'[Date]),
MAX('Table'[Date]),
DAY
)</PRE><P> </P>Mon, 08 May 2017 03:40:06 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/171076#M74684Phil_Seamark2017-05-08T03:40:06ZRe: Measure to calculate the number of days between two dates in a date slider
https://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/359000#M161884
<P>Hello,</P><P> </P><P>How about returning just business days M-F</P><P> </P><P>Thanks</P>Thu, 15 Feb 2018 17:00:01 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/359000#M161884chaddruck2018-02-15T17:00:01ZRe: Measure to calculate the number of days between two dates in a date slider
https://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/359018#M161891
<P>Hi <LI-USER uid="55168"></LI-USER></P><P> </P><P>One way is to keep a column in your Date Table that carries just 1's and 0's. Set weekend values (and holidays if you can) to 0. That way you can just SUM the column between the dates you care about and that should hopefully give you the number you need.</P>Thu, 15 Feb 2018 17:24:51 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-calculate-the-number-of-days-between-two-dates-in-a/m-p/359018#M161891Phil_Seamark2018-02-15T17:24:51Z