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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Dk_bbr
New Member

how to find interval between dates

My english too bad for this hope you can understand. I have problem like some guide comes 10 time in year to my store and i need to find how much days to take between that 10 comes?

1 ACCEPTED SOLUTION

not sure if this is what you want

 

Column =
VAR _last=maxx(FILTER('Table','Table'[GuideID]=EARLIER('Table'[GuideID])&&'Table'[Date]<EARLIER('Table'[Date])),'Table'[Date])
return if(ISBLANK(_last),blank(),DATEDIFF(_last,'Table'[Date],DAY))
 
11.PNG
 
then create a measure
measure = AVERAGE('Table'[Column])
12.PNG
 
pls see the attachment below
 




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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Uzi2019
Super User
Super User

Hi @Dk_bbr 

Give sample data of your model so we can provide you the solution.
How many columns are there in your report?

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
ryan_mayu
Super User
Super User

could you pls provide some sample data and expected output?





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

Proud to be a Super User!




DateGuideIDGuideNameComesInSales
1/1/2310051Bam15000
2/1/2310051Bam115022
3/14/2310051Bam1151563
5/24/2310051Bam115400
5/30/2310051Bam13600
6/15/2310051Bam19500
7/23/2310051Bam14500
8/1/2310051Bam13250
8/15/2310051Bam18900

 That ComesIn only equils to 1 and i want to know average interval days in these between 10 dates? is that possible like similar to in year 10 times and in a month 2 times?

not sure if this is what you want

 

Column =
VAR _last=maxx(FILTER('Table','Table'[GuideID]=EARLIER('Table'[GuideID])&&'Table'[Date]<EARLIER('Table'[Date])),'Table'[Date])
return if(ISBLANK(_last),blank(),DATEDIFF(_last,'Table'[Date],DAY))
 
11.PNG
 
then create a measure
measure = AVERAGE('Table'[Column])
12.PNG
 
pls see the attachment below
 




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

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.