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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lauriemclolo
Helper III
Helper III

visual calculation error when filtering on date cannot conver to date/time

I am trying to limit my visual to a date.  Every time I choose a date, I get this error

 

lauriemclolo_1-1748554687931.png

I've shown the visual calculation below with the formula for 'Member %', which works fine with no date filter.  And the date field I am using is definitely formatted as a date.

 

 

lauriemclolo_0-1748554662551.png

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @lauriemclolo 

This error message appears when the visual calculation tries to return a text value (like "N/A" or "") in a context where a numeric or date value is expected.
It usually happens when a filter (like a date filter) changes the context and causes part of the formula to evaluate differently — for example, a DIVIDE() that returns blank, or a conditional expression (IF, SWITCH) with inconsistent return types.

To check what's causing it:

  1. Recreate the visual calculation as a regular DAX measure with the same logic.

  2. Use SELECTEDVALUE, DIVIDE, and IF carefully — make sure all branches return a consistent data type (preferably numeric).

  3. If any branch returns text (even ""), replace it with BLANK() or a default numeric like 0.

If the DAX version works with no issues under the same filters, it's likely a bug or limitation in the visual calculation engine.

In that case, report it as a bug the issues , please include the link to the pbix

https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

7 REPLIES 7
lauriemclolo
Helper III
Helper III

Thank you.  This helped me find the error, which was missing data in certain date periods.

Happy to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
v-achippa
Community Support
Community Support

Hi @lauriemclolo,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @Ritaf1983 for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user resolved your issue? or let us know if you need any further assistance.
If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @lauriemclolo,

 

We wanted to kindly follow up to check if the solution provided by the user resolved your issue.

If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @lauriemclolo,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user resolved your issue.
If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Ashish_Excel
Super User
Super User

Hi,

Share the download link of the PBI file.  Show the problem there clearly.

Ritaf1983
Super User
Super User

Hi @lauriemclolo 

This error message appears when the visual calculation tries to return a text value (like "N/A" or "") in a context where a numeric or date value is expected.
It usually happens when a filter (like a date filter) changes the context and causes part of the formula to evaluate differently — for example, a DIVIDE() that returns blank, or a conditional expression (IF, SWITCH) with inconsistent return types.

To check what's causing it:

  1. Recreate the visual calculation as a regular DAX measure with the same logic.

  2. Use SELECTEDVALUE, DIVIDE, and IF carefully — make sure all branches return a consistent data type (preferably numeric).

  3. If any branch returns text (even ""), replace it with BLANK() or a default numeric like 0.

If the DAX version works with no issues under the same filters, it's likely a bug or limitation in the visual calculation engine.

In that case, report it as a bug the issues , please include the link to the pbix

https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.