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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Ismari
New Member

HELP! Date filter to return a closure rate (value) for a previous fiscal year end (last FY month)

Hi, I have a measure to calculate the closure rate for the previous financial year. It takes the value of the last month for the previous financial year because it is not a sum of all the months. The problem is the date filter in the measure specifies the year end as "30 June 2023". This is working fine now, but when moving to the next FY, I will have to change all the measures I have with the new FY ending. 

Any wisdom to make the measure more automatic?

 

Here is my measure: (problem areas in GREEN)

MOCs PRE FY21 CLOSURE RATE = if(ISBLANK(sum('ROBOT-Incidents'[MOCsPREFY21])),BLANK(),(calculate(sum('ROBOT-Incidents'[MOCsPREFY21]),PREVIOUSYEAR(DateTableV2_0[Date],"30 June 2023"))-sum('ROBOT-Incidents'[MOCsPREFY21]))/calculate(sum('ROBOT-Incidents'[MOCsPREFY21]),PREVIOUSYEAR(DateTableV2_0[Date],"30 June 2023")))
1 ACCEPTED SOLUTION

Haaa! got it!

 

MOCs PRE FY21 CLOSURE RATE2 = IF( ISBLANK(SUM('ROBOT-Incidents'[MOCsPREFY21])), BLANK(), ( CALCULATE( SUM('ROBOT-Incidents'[MOCsPREFY21]), PREVIOUSYEAR(DateTableV2_0[Date],"30/6")) ) - SUM('ROBOT-Incidents'[MOCsPREFY21]) ) / CALCULATE( SUM('ROBOT-Incidents'[MOCsPREFY21]), PREVIOUSYEAR(DateTableV2_0[Date], "30/6"))

View solution in original post

4 REPLIES 4
AlphaBravo
New Member

Hi, Ismari 👋

 

Just to clarify, your FY ends on 30th of June?

 

If so, this code should achieve the result that you are looking for

MOCs PRE FY21 CLOSURE RATE = 
IF(
    ISBLANK(SUM('ROBOT-Incidents'[MOCsPREFY21])),
    BLANK(),
    (
        CALCULATE(
            SUM('ROBOT-Incidents'[MOCsPREFY21]),
            SAMEPERIODLASTYEAR(EDATE(DateTableV2_0[Date], -6))
        )
        - SUM('ROBOT-Incidents'[MOCsPREFY21])
    )
    / CALCULATE(
        SUM('ROBOT-Incidents'[MOCsPREFY21]),
        SAMEPERIODLASTYEAR(EDATE(DateTableV2_0[Date], -6))
    )
)

 

Haaa! got it!

 

MOCs PRE FY21 CLOSURE RATE2 = IF( ISBLANK(SUM('ROBOT-Incidents'[MOCsPREFY21])), BLANK(), ( CALCULATE( SUM('ROBOT-Incidents'[MOCsPREFY21]), PREVIOUSYEAR(DateTableV2_0[Date],"30/6")) ) - SUM('ROBOT-Incidents'[MOCsPREFY21]) ) / CALCULATE( SUM('ROBOT-Incidents'[MOCsPREFY21]), PREVIOUSYEAR(DateTableV2_0[Date], "30/6"))

Hi @Ismari ,

 

Thank you for your feedback. Has the issue been resolved so far? If so, please mark it as the correct solution, and point out if the problem persists.

 

Best Regards,
Adamk Kong

Yes, FY end 30 June.

I do get an error saying "Parameter is not the correct type" and the 

(EDATE(DateTableV2_0[Date], -6) part is underlined red

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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