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
jofoster
Employee
Employee

Rolling 28 Day Measure

A version of this question has been asked numerous times, but I still cannot figure it out from all the other examples.  I am trying to calculate a rolling 28 day count of responses.

 

A view of my data set is below, as is my current formula for the measure.  What I thought this would do was sum up the count of responses across the last 28 days, but all it seems to return is the latest day values.  In addition, I want the measure to be responsive to additional filters  from the data set below - IsUserInternal and Service. It seems to be doing that, but, again, only showing the counts for the specific day

 

Thanks in advance.

 

28DResponses = CALCULATE(sum('Response Daily Counts'[Responses]),DATESINPERIOD('Response Daily Counts'[EventDate],LASTDATE('Response Daily Counts'[EventDate]),28,DAY))

 
 

Capture.PNG

 
3 REPLIES 3
jofoster
Employee
Employee

Here is my data again in an easier format to consume.  

 

EventDateServiceIsUserInternalPromptsResponsesCommentCount
2019-10-22 00:00:00.0000000Boards012969113
2019-10-22 00:00:00.0000000Boards1247121
2019-10-23 00:00:00.0000000Boards012339010
2019-10-23 00:00:00.0000000Boards119690
2019-10-24 00:00:00.0000000Boards012009314
2019-10-24 00:00:00.0000000Boards120551
2019-10-25 00:00:00.0000000Boards010557514
2019-10-25 00:00:00.0000000Boards119351
2019-10-26 00:00:00.0000000Boards070114
2019-10-26 00:00:00.0000000Boards13810
2019-10-27 00:00:00.0000000Boards010572
2019-10-27 00:00:00.0000000Boards11300
2019-10-28 00:00:00.0000000Boards012869216
2019-10-28 00:00:00.0000000Boards117530
2019-10-29 00:00:00.0000000Boards012329311
2019-10-29 00:00:00.0000000Boards1206110
2019-10-30 00:00:00.0000000Boards012809318
2019-10-30 00:00:00.0000000Boards1192103
2019-10-31 00:00:00.0000000Boards120491
2019-10-31 00:00:00.0000000Boards01196898
2019-11-01 00:00:00.0000000Boards08876612
2019-11-01 00:00:00.0000000Boards118860
2019-11-02 00:00:00.0000000Boards07741
2019-11-02 00:00:00.0000000Boards12310
2019-11-03 00:00:00.0000000Boards010670
2019-11-03 00:00:00.0000000Boards11610
2019-11-04 00:00:00.0000000Boards01358929
2019-11-04 00:00:00.0000000Boards121691
2019-11-05 00:00:00.0000000Boards122840
2019-11-05 00:00:00.0000000Boards0136812018
2019-11-06 00:00:00.0000000Boards012508817
2019-11-06 00:00:00.0000000Boards1216101
2019-11-07 00:00:00.0000000Boards012508720
2019-11-07 00:00:00.0000000Boards120580
2019-11-08 00:00:00.0000000Boards010697816
2019-11-08 00:00:00.0000000Boards118091
2019-11-09 00:00:00.0000000Boards12900
2019-11-09 00:00:00.0000000Boards08163
2019-11-10 00:00:00.0000000Boards11520
2019-11-10 00:00:00.0000000Boards09991
2019-11-11 00:00:00.0000000Boards121170
2019-11-11 00:00:00.0000000Boards012197311
2019-11-12 00:00:00.0000000Boards0135910420
2019-11-12 00:00:00.0000000Boards120482
2019-11-13 00:00:00.0000000Boards012848419
2019-11-13 00:00:00.0000000Boards1199102
2019-11-14 00:00:00.0000000Boards0121810017
2019-11-14 00:00:00.0000000Boards121551
2019-11-15 00:00:00.0000000Boards116230
2019-11-15 00:00:00.0000000Boards010007813
2019-11-16 00:00:00.0000000Boards0108121
2019-11-16 00:00:00.0000000Boards13221
2019-11-17 00:00:00.0000000Boards011290
2019-11-17 00:00:00.0000000Boards12320
Greg_Deckler
Super User
Super User

Please post data in text form. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks for the tips.  I copied the data into the post. I could not figure out how to add attachments...perhaps that is not allowed in this forum. Thanks for your help. I looked at your other thing and I could not make the jump to solve my problem.

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.