Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I recent encountered a problem with a date table that was generated with the Calendar function.
If i attempt to calculate a date outside of the tables range I encounter a blank value.
Scenario:
I calculate a date table between 1/Jan/2018 to 31/Dec/2018. When using these dates against financial data the requirement is often to show the Financial Year and Not the Calendar year. In my scenario the company's financial year spans from July to Jun. So the date range span across Financial Year 2017/2018 to 2018/2019. To perform my Financial Year calculation i would determine the financial year by taking a given date and add 6 months then extracting the year YEAR(DATEADD(<date>, 6, MONTH)). Any date after 01/Jul/2018 will return a blank result since the DATEADD function calculates a date outside of the tables date range.
Now i am using an IF statement to correct this by shifthing to YEAR(DATEADD(<date>, -6, MONTHS))+1 when a blank is returned but, it would be nice if this issue can be looked at.
Thank you and i appologise for the long winded explaination 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.