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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Dk_bbr
Regular Visitor

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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