Forum Discussion
Year To Fiscal Month Start Date
Why does this not worK? I am trying to get Year to Fiscal Month Start date -1
UnitCountYTFMSD = CALCULATE(COUNTROWS(FactWholesale), DATESBETWEEN(FactWholesale[INV DATE (I10)],MIN(DimDate[FiscalYearStartDate]),min(DimDate[FMSD])),filter(DimDate,DimDate[IsCurrentFiscalYear]=1))
FMSD = DATEADD(DimDate[FiscalMonthStartDate].[Date],-1,DAY) which appears to be working fine.
Maybe there is a better way to get YTFMSD, if there is please let me know.
5 Replies
- vazmor
Helper II
What I understand is that you are trying to get for example if your fiscal year starts in July that the calculation takes you June or want it to be 07/01/2017 -1?- IAmCareFrequent Visitor
Our fiscal year started 8/27/2017 and the current fiscal month started 7/1/2018. I need to get a count from 8/27/2017 thru 6/30/2018.
- v-yulgu-msft
Microsoft Employee
Hi IAmCare,
Would you please provide some dummy data to make the formula more readable? Also, please illustrate the desired result with examples, show us how to calculate it correctly.
Regards,
Yuliana Gu
- IAmCareFrequent Visitor
Yes thank You
INV DATE (I10) UNIT KEY 8/28/2017 10X51292 8/29/2017 70X44644 8/31/2017 70X44705 9/1/2017 10W96236 12/19/2017 70X44815 12/19/2017 70X44877 2/6/2018 10X53799 2/6/2018 10X54154 4/12/2018 10Y57102 6/14/2018 15Y16499 6/29/2018 10W50613 7/2/2018 10Y54869 7/23/2018 70Y45809 I am also using a DimDate dimension. For my YearToFiscalMonthStartDate I should get a count of 11 because the last 2 are in July which is the current fiscal month
- IAmCareFrequent Visitor
Actually what I would like to see is Accumulating
4 for september
6 for sept thru dec
8 thru Feb
9 Thru April
11 Thru June