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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Memorphix
New Member

time intelligence problem, need a dax help

Hi, a time intelligence problem. Suppose i have 3 year data: 2021 2020 and 2019 Now I have all 12 months data in 2019, 2020 but only 3 months data in 2021. Indian fiscal year = April (start), March (end)

I need a dax for: When I do the previous year calculation, suppose for 2021, then it gives me only 3 months of 2020 data (as i have only april may jun data in 2021), but when I do previous year calculations for 2020, it gives me all 2019 data (as I have all months data in 2020). Please help?

1 ACCEPTED SOLUTION
Rayshin
Memorable Member
Memorable Member

You need to use a proper filter rather than the PREVIOUSYEAR() function

CALCULATE(
  [YourMeasure]
  ,FILTER(
      ALL('DimDate')
      ,'DimDate'[Year] = MAX('DimDate'[Year])
        )
  )

 

View solution in original post

1 REPLY 1
Rayshin
Memorable Member
Memorable Member

You need to use a proper filter rather than the PREVIOUSYEAR() function

CALCULATE(
  [YourMeasure]
  ,FILTER(
      ALL('DimDate')
      ,'DimDate'[Year] = MAX('DimDate'[Year])
        )
  )

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.