Forum Discussion
How to overcome error "Function 'DATEADD' expects a contiguous selection..." with bi-dir date table
- 3 years ago
Thank you for your message NikhilChenna .
However, in my case, due to the narrow timeframe of dataset, currently I have data only for this year, and in every situation I want to compare two following quarters, so they are indeed contiguous.
And also, based on this logic this should break both quarter names and numeric calculations.In the meantime I found one, not very elegant tho, solution, which after initial testing seems working fine.
I have replaced the previously used measure for giving previous of the selected quarter:PreviousQrt =CALCULATE((fct_SendMessages[SelectedQrt]),DATEADD('Calendar'[Date], -1, QUARTER))And replaced with this measure:PreviousQrt_viaMax =CALCULATE(MAX('Calendar'[Quarter])) -1
As I have mentioned, not very elegant, but it seems it is doing the required job, so far all is good. I think we can close this thread.Thank you
Hi Draginko ,
As the error says you can't have periods selected that are not contiguous to one another. So, if you select Jan and Feb in the same year it'll work, but if you select Jan and March, say, in the same year, it'll not work.
But to solve this i suggest to check the relationships once again the issue is there only.
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
You won't get any kudos with responses like this. Why bother?