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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
ArchStanton
Impactful Individual
Impactful Individual

Error Message Help needed

Hi,

 

I've inherited a Data Model that I'm trying to improve, however, I'm getting this error message in a measure which I'm struggling to understand let alone fix:

 

ArchStanton_0-1702290107293.png

 

The measure is here:

YTD New Complaints =
TOTALYTD (
    COUNT ( 'Cases'[Case Number] ),
    'Cases'[tpo_applicationvalidationdate].[Date],
    "31/03"
)

 

I have recently built a new Financial Year Calendar in order to calculate YTD calculations but this tpo_applicationvalidationdate column contains blanks and has an inactive relationship with my calendar.

 

Created Calendar = 

VAR FYStartMonth = 4    --use 4, 7 or 10

VAR StartYear = YEAR(MIN('Cases'[Created On])) - 
        (MONTH(MIN('Cases'[Created On])) < FYStartMonth)

VAR EndYear = YEAR(MAX('Cases'[Created On])) +
        (MONTH(MAX('Cases'[Created On])) >= FYStartMonth)

VAR CalStart = DATE(2019, 4, 1)
VAR CalEnd = DATE(EndYear, FYStartMonth, 1) -1

RETURN ADDCOLUMNS(
    CALENDAR(CalStart, CalEnd),
    "Year", YEAR([Date]),
    "Qtr", QUARTER([Date]),
    "Month", MONTH([Date]),
    "MthName", FORMAT([Date], "MMM"),
    "FY", "FY" & YEAR([Date]) - (MONTH([Date]) < FYStartMonth) & "/" &
        YEAR([Date]) + (MONTH([Date]) >= FYStartMonth),
    "Financial Mth", MOD(MONTH([Date]) - FYStartMonth, 12) +1,
    "Financial Qtr", "FQ" & ROUNDUP(DIVIDE(MOD(MONTH([Date]) - FYStartMonth, 12) +1, 3), 0),
    "DayofWkName", FORMAT([Date], "ddd"),
    "DayofWkNumber", WEEKDAY([Date],2),
    "YearMthNum", (YEAR([Date]) * 100) + MONTH([Date]),
    "WorkingDays", NOT WEEKDAY([Date]) IN {1,7}
)

 

I cannot send a copy of the pbix file as its live data and the data model is huge so I'm hoping someone can point me in the right direction?

Thanks,

 

Ps I have a continuous range of dates in 'Create Calendar' [date] 

Thanks

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

You are using your own Dates table and have probably switched off Auto date/time feature so references to .[Date] will not work.

Use the Date field you have created, put it in that measure

View solution in original post

2 REPLIES 2
HotChilli
Community Champion
Community Champion

You are using your own Dates table and have probably switched off Auto date/time feature so references to .[Date] will not work.

Use the Date field you have created, put it in that measure

Thanks, that was the reason!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.