Skip to main content
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.

New Member

Count rows in current financial year and compare to same time in previous financial year



I am relatively new to PowerBi and I have been looking to practice on some example data.


My aim is to count the number of rows in my dataset (Based on number of fires and there is 1 fire per row) in the current financial year to date and the same time in the previous financial year (FY runs from 1/4 to 31/3).


I have come across a previous chat which I have replicated the solution from in my own dataset successfully. However this was designed for calendar year and I would like to ammend it for financial year.


Any help on how to do this based on the below DAX would be greatly appreciated.


Total Sales =


YTD prods =


    [Total Sales],

    FILTER (


        'Calendar'[Year] = YEAR ( TODAY () )

            && 'Calendar'[Date] <= TODAY ()



LY YTD Sales =


    [Total Sales],

    FILTER (



            = YEAR ( TODAY () ) - 1

            && 'Calendar'[Date]

                <= EOMONTH ( TODAY (), -13 ) + DAY ( TODAY () )



Difference% =

DIVIDE([YTD prods] - [LY YTD Sales],[LY YTD Sales])


Helpful resources

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

April Fabric Community Update

Fabric Community Update - April 2024

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

March 2024 PBI Gallery Image

Power BI Monthly Update - March 2024

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