cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Partisan
Post Partisan

Calculating the variance between variable dates

Hi there

 

I've imported an excel file into PBI which has a date column and a value column. Simple. The date range varies for example it holds

01/01/2020, 02/01/2020, 03/01/2020, 04/01/2020, 12/01/2020. Random. 

 

I need to calculate the variance between the consecutive dates. 

 

How?

 

Jemma

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Calculating the variance between variable dates

Hi @heytherejem , 

I am not clear "consecutive dates" ,did you mean two date rows in table or "consecutive calendar dates"? You could refer to my sample for details.

Best Regards,
Zoe Zhi

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

3 REPLIES 3
Highlighted
Resident Rockstar
Resident Rockstar

Re: Calculating the variance between variable dates

@heytherejem 

please share the sample data and the expected output.

 

Did I answer your question? Mark my post as a solution.Appreciate your Kudos!
Proud a to be a Datanaut!
Thanks and BR
Ryan
Highlighted
Super User IV
Super User IV

Re: Calculating the variance between variable dates

@heytherejem , This should give you data for last non-continuous date

Last Day Non Continous = CALCULATE(sum('order'[Qty]),filter(all('Date'),'Date'[Date] =MAXX(FILTER(all('Date'),'Date'[Date]<max('Date'[Date])),order['Date'])))

This Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))

 

you can use these and subtract



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Community Support
Community Support

Re: Calculating the variance between variable dates

Hi @heytherejem , 

I am not clear "consecutive dates" ,did you mean two date rows in table or "consecutive calendar dates"? You could refer to my sample for details.

Best Regards,
Zoe Zhi

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors