cancel
Showing results for
Did you mean:
Highlighted
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

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

3 REPLIES 3
Highlighted
Super User III

## Re: Calculating the variance between variable dates

please share the sample data and the expected output.

Proud a to be a Datanaut!
Thanks and BR
Ryan
Highlighted
Super User IX

## 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

Proud to be a Super User!

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

Announcements

#### Microsoft Ignite

This will be a conference that you do not want to miss!

#### Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

#### August Community Highlights

Check out a full recap of the month!

#### August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

#### Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors