Forum Discussion
Reference value from first Fiscal Month as denominator for subsequent months
- 7 years ago
wi11iamr not sure how you are calculating first month start and end date. Can you replace these with fixed value to see if this measure works which will and that will tell the measure you are using to start and end date need revisit.
to use fixed value replace start and end date with date( 2018, 07, 01 ), date(2018, 07, 31)
wi11iamr not sure how you are calculating first month start and end date. Can you replace these with fixed value to see if this measure works which will and that will tell the measure you are using to start and end date need revisit.
to use fixed value replace start and end date with date( 2018, 07, 01 ), date(2018, 07, 31)
- wi11iamr7 years ago
Advocate II
Thanks parry2k, the measure now works when using the fixed vallue dates as you suggested.
With a little more tinkering and investigative snooping, I found my mistake in the below code - it's quite laughable actually, as the "Start Date" I had mistakenly recorded as 31, instead of 1 and vice versa in the "End Date".Thanks for your quick response and suggested path of investigation.
First Sales Month Start = VAR FirstFiscalMonth = 7 /* Set the first month of the fiscal year */ VAR LastDay = MIN ( 'Calendar'[Date] ) VAR LastMonth = MONTH ( LastDay ) VAR LastYear = YEAR ( LastDay ) - IF ( LastMonth < FirstFiscalMonth, 1 ) VAR FilterYtd = DATE ( LastYear, FirstFiscalMonth, 31 ) RETURN FilterYtd