Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
@KEO46 , Always used a date table, marked as date tbale joined 1- Many (Single Directional) with your table
PreMonth = CALCULATE(COUNT('Combine Exception'[TargetObjectId ]),DATEADD('Date'[Date],-1,MONTH))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Yes this was extreamly helpful.
@KEO46 , Always used a date table, marked as date tbale joined 1- Many (Single Directional) with your table
PreMonth = CALCULATE(COUNT('Combine Exception'[TargetObjectId ]),DATEADD('Date'[Date],-1,MONTH))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |