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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
GC26
New Member

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

Hi,

 

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 =

CALCULATE(SUM(Data[Sales]))

YTD prods =

CALCULATE (

    [Total Sales],

    FILTER (

        'Calendar',

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

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

    )

)

LY YTD Sales =

CALCULATE (

    [Total Sales],

    FILTER (

        'Calendar',

        'Calendar'[Year]

            = YEAR ( TODAY () ) - 1

            && 'Calendar'[Date]

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

    )

)

Difference% =

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

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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