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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
dax
Community Support
Community Support

Hi @Anonymous , 

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
dax
Community Support
Community Support

Hi @Anonymous , 

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.

amitchandak
Super User
Super User

@Anonymous , 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

ryan_mayu
Super User
Super User

@Anonymous 

please share the sample data and the expected output.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.