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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
On whole workspace, after midnight parts of reports stopped working correctly. Nothing was changed in reports (some were aumatically refreshed for last few months).
Source of data - SnowFlake
Random visuals are returning issue: We're sorry, an error occurred during evaluation.;Object reference not set to an instance of an object. Object reference not set to an instance of an object.
When checked visual by visual it made no sense - two different measures, one "count" - thorwing error second "distinctcount" - working.
To make it even more confusing on desktop everything works correctly, only when published to Workspace issues are showing.
Can someone help and advice how this can be fixed?
Solved! Go to Solution.
Hi @Pawel_1990 , Thank you for reaching out to the Microsoft Community Forum.
Microsoft recently introduced stricter runtime evaluation for DirectQuery sources like Snowflake. Visuals now fail when nulls or unexpected structures are returned at runtime, issues that were previously handled silently.
Your reports haven’t changed, but Power BI Service has. If Snowflake returns a null, an empty join, or altered structure, measures like COUNT([Column]) can now throw errors, while others like DISTINCTCOUNT may still work. To avoid this, wrap measures to handle nulls explicitly.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
Hi @Pawel_1990 , Thank you for reaching out to the Microsoft Community Forum.
Microsoft recently introduced stricter runtime evaluation for DirectQuery sources like Snowflake. Visuals now fail when nulls or unexpected structures are returned at runtime, issues that were previously handled silently.
Your reports haven’t changed, but Power BI Service has. If Snowflake returns a null, an empty join, or altered structure, measures like COUNT([Column]) can now throw errors, while others like DISTINCTCOUNT may still work. To avoid this, wrap measures to handle nulls explicitly.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
This comment helped me to find solution. There are two options:
- rewrite DAX code / Power Query steps to be clean. Check some data types (they like to get messed up in my case)
- other way is to switch [implementation =2.0] at Power Query code level to =1.0 or remove it (it may also mess some data types so check it as well)
I'm having the same problem despite using DistinctCount. Is there a document that shows how to handle this?
Pct_BillAging_90Plus =
DIVIDE(
CALCULATE(
DISTINCTCOUNT(BILLING_DETAIL[HEADER_ID]),
NOT(ISBLANK(BILLING_DETAIL[BILL_AGING])),
BILLING_DETAIL[BILL_AGING] >= 90,
BILLING_DETAIL[BALANCE] > 0
),
CALCULATE(
DISTINCTCOUNT(BILLING_DETAIL[HEADER_ID]),
NOT(ISBLANK(BILLING_DETAIL[BILL_AGING])),
BILLING_DETAIL[BALANCE] > 0
)
)This is my DAX for example.
Hi @SPPBI , Thank you for reaching out to the Microsoft Community Forum.
Logic like NOT(ISBLANK(...)) outside of FILTER() can cause runtime failures when columns contain nulls or the query doesn’t fold cleanly. That’s why you're seeing “Object reference not set...” errors, even though the report hasn’t changed.
To fix it, move all conditions into FILTER() to ensure stable query translation. Example:
Pct_BillAging_90Plus =
DIVIDE(
CALCULATE(
DISTINCTCOUNT(BILLING_DETAIL[HEADER_ID]),
FILTER(
BILLING_DETAIL,
NOT ISBLANK(BILLING_DETAIL[BILL_AGING]) && BILLING_DETAIL[BILL_AGING] >= 90 &&
BILLING_DETAIL[BALANCE] > 0
)
), CALCULATE(
DISTINCTCOUNT(BILLING_DETAIL[HEADER_ID]),
FILTER(
BILLING_DETAIL,
NOT ISBLANK(BILLING_DETAIL[BILL_AGING]) &&
BILLING_DETAIL[BALANCE] > 0
)
)
)
Please refer to the below documentation:
DirectQuery model guidance in Power BI Desktop - Power BI | Microsoft Learn
Lesson Learned #524: Optimizing Power BI with DirectQuery | Microsoft Community Hub
DirectQuery in Power BI - Power BI | Microsoft Learn
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!