Forum Discussion
visual calculation error when filtering on date cannot conver to date/time
- 1 year ago
Hi Anonymous
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, aDIVIDE()that returns blank, or a conditional expression (IF,SWITCH) with inconsistent return types.To check what's causing it:
-
Recreate the visual calculation as a regular DAX measure with the same logic.
-
Use
SELECTEDVALUE,DIVIDE, andIFcarefully — make sure all branches return a consistent data type (preferably numeric). -
If any branch returns text (even
""), replace it withBLANK()or a default numeric like0.
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
-
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