Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Find Missing Dates in a Table

Hi, 

 

I have the challenge of detecting if there are missing dates according to the records of a table, those missing dates, would belong to a corresponding Fiscal Week, I need to know how many fiscal weeks are missing in the table. 

 

Table 1 - Actual Date Column.

Multiple records from multiple individuals. In this Column is where I would Like to detect if there is a Week Missing. 

Calendar Table - Fiscal Week Value, According to a Unique Date

 

 

For making myself clear, I would like to visualize if theres a week missing on those dates. For example if there's no record at all for the 2nd fiscal week on the table. 

 

Currently I'm just able to count the number of weeks that have been uploaded in total, but I have no clue yet if there is any missing weeks for an individual for example.  

 

Measure for counting the number of weeks uploaded:

 

Missing Weeks in Data Set = CALCULATE(DISTINCTCOUNT(Calendar[WeeKFY2]), DATESBETWEEN(Calendar[Date],FIRSTDATE('Table1'[Actual Date]), LASTDATE('Table1'[Actual Date])))

 

 

How could I achieve a measure to know if there are missing weeks on the data? I would Like for the measure to give me 0 if there are no missing weeks for example. 

 

I don't know if there might be a specific function for this. 

 

Thanks!

7 Replies