Days in invoice report

I have a power pivot model whith an invoice table. In each line I have invoice number, due date and invoice amount.

I need to calculate the number of days between a "date parameter" and due date. How can do that?

June 30th, 2015 1:56pm

Hi Mdenis,

According to your description, you need to get the number of days between a "date parameter" and the due date which is a column in your invoice table, right?

Microsoft Excel and PowerPivot internally stores dates and times as number representing the number of days since 1900-Jan-0, plus a fractional portion of a 24 hour day ddddd.tttttt. This number is called serial date-time. To see this serial date-time value you should multiple date value by 1.0 (or 1.). Lets say you have column Date1 with value "21/12/2009 21:00:00". If you will create PowerPivot formula "= 1. * [Date1]", then result of this new calculation will be "40168.88". So you can use the DAX expression below to get the number of days between a "date parameter" and the due date.
=1. * ([Date2]-[Date1])

Reference
http://www.powerpivot-info.com/post/143-q-how-can-i-calculate-difference-between-two-dates-in-dax-seconds-minutes-hours-days-and-months

Regards,

Free Windows Admin Tool Kit Click here and download it now
July 1st, 2015 3:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics