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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Kritika_
Frequent Visitor

Still getting error with IFERROR()

I have used this measure to calculate the ytd of the selectedYear-1 :
CALCULATE
(
        SUM(v_f_oppor_apac[line item amount nypmar]),
        OpportunityStage[OpportunityStage_Harmonized] = "Won",
        SAMEPERIODLASTYEAR(d_date_closed[day_dt]),
        v_f_oppor_apac[K_YTDDatePrevYear] = TRUE()
    )  

  //[K_YTDDatePrevYear]: this measure is flag that marks all the dates till today of previous yr as TRUE().


But I'm getting the error when I select the yr 2024 from the filter:
Kritika__0-1686314505349.png

And even after using the functions IFERROR() and ISERROR() I'm still getting the same error.
Can anyone let me know what I'm doing wrong here.

Thankyou for your time!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Kritika_ 

Please check the following

1.Whether your date table is in a one-to-many relationship with the data table, and if it is a many-to-many relationship, the error shown in the figure may occur

2.Whether your date table and data table are one-way joins.

You can refer to the following link.

Solved: Contiguous date selection error - YTD LY - Microsoft Fabric Community

Solved: Function 'SAMEPERIODLASTYEAR' expects a contiguous... - Microsoft Fabric Community

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Kritika_ 

Please check the following

1.Whether your date table is in a one-to-many relationship with the data table, and if it is a many-to-many relationship, the error shown in the figure may occur

2.Whether your date table and data table are one-way joins.

You can refer to the following link.

Solved: Contiguous date selection error - YTD LY - Microsoft Fabric Community

Solved: Function 'SAMEPERIODLASTYEAR' expects a contiguous... - Microsoft Fabric Community

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors