Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
IAmCare
Frequent Visitor

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 5
v-yulgu-msft
Employee
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

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes thank You

INV DATE (I10)UNIT KEY
8/28/201710X51292
8/29/201770X44644
8/31/201770X44705
9/1/201710W96236
12/19/201770X44815
12/19/201770X44877
2/6/201810X53799
2/6/201810X54154
4/12/201810Y57102
6/14/201815Y16499
6/29/201810W50613
7/2/201810Y54869
7/23/201870Y45809

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

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

vazmor
Helper II
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?

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.