Forum Discussion
Help needed for DAX rolling calculation
Last60Days = IF(AND([Date] >= [Today]-60, [Date] <= [Today]),1,0)
I am trying to calculate the rolling number of completed and planned meetings.
For the completed meetings, I'm trying to calculate the number of meetings in the past 60 days, while the planned meetings I'm trying to calculate the planned meetings in the future. I believe I got the past 60 days calculation correct, but it's totaling wrong with the "61". Also, I am not sure how to do the calculation for the planned meetings.
I had invoked a table using the script found here:
http://www.mattmasson.com/2014/02/creating-a-date-dimension-with-a-power-query-script/
If someone could help me with the DAX formula, that would be great! Thanks!
11 Replies
- NhallquistHelper V
What formula are you using to count the number of meetings in the past 60 days? Are you counting the date, or a unique meeting identifier. Ideally, you want to count the Index. If you don't have one, you can always try Sum(Last60Days). Then you would be adding a 1 for every meeting occurrance.
For meetings in the future, I would stay with what you did for Meetings past, and do something like...
FutureMeetingFlag=If([Date]>Today(), 1,0)
Then you can use Sum([FutureMeetingFlag])
Let us know if this resolves the issue,
Nate
- RsanjuanAdvocate III
thanks for the reply. I don't have a separate formula to count the number of meetings in the past 60 days.
In the field "status" there are two types; Completed Meetings and Planned Meetings.
I just set the rows for the account person and the columns to the "status" field. I used the 60day calculation as a visual filter.
I will try your suggestions. Thanks!
- RsanjuanAdvocate III
I tried the future formula, it seems to work, but it's a bit off. The actual data has 4, but it's only showing 3. And it is totaling wrong :(