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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Wadda7AboUdai
Helper I
Helper I

calculate days count between 2 dates

Hello Everyone 

I want to calculate days starts with item purchese date to item transfer date , items can be more than ones in the table it means can be purchesd more than ones and for all branches , I want to calculate the days  for each branch and sorted by dates if there are more than one purches order 

 

Here is the source table 

 

itemtransaction numbertypedatedecsbranch
A01301-01-2024purchase orderA
A012210-01-2024Transfer orderA
A02307-01-2024purchase orderA
A022214-01-2024transferA
B03301-01-2024purchaseA
B04301-01-2024purchaseB
B032213-01-2024transferB

 

I want to Get the result like this 

itemtransaction numberbranchDays Count
A01A
A02A7
B04B12

 

 

21 REPLIES 21

so the last row should read 04?

 

BTW, where I come from Jan 1 to Jan 13 is 13 days, not 12 days.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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