Forum Discussion

KEO46's avatar
KEO46
Icon for Helper I rankHelper I
2 years ago
Solved

Calculate Previous Months Total

I need to create a measure that documents the previouse months total number of exceptions that were submitted so I can display it in a month on month report.  The field for the exceptions, "Combine Exception'[TargetObjectId" is a text so I used the calculate count function.  I created a calendar table with a relationship to the date field, "Combine Exception'[CreatedDate ]".  But when I add the created date to the formula I am getting an error, "Function "DATEADD' expects a contiguous selection when the date column is not unique, has gaps or it contains time portion."

 

I have never used a calendar table before so I am not sure if the formual that I have is correct.  Below is the formula that I used for my PrevMonth field. 

 

PreMonth = CALCULATE(COUNT('Combine Exception'[TargetObjectId ]),DATEADD('Combine Exception'[CreatedDate ],-1,MONTH))
 
If you know of a video that I can watch for a first time user of a calendar table that will help me to create the measure please share it with me.
 
 

2 Replies