Forum Discussion
robmarsh
Helper I
1 year agoAn Unexpected Exception Occurred error message on PBI Desktop only
I have a very strange error that occurs on Power BI Desktop only, when I publish the report to the service it runs fine. The error occurs when I add a particular measure to any visual. The error look...
robmarsh
Helper I
1 year agoQuick update: I managed to get the errors fixed by changing the column filters from being separate (with a comma) to being compounded (with &&) like below:
VAR tocount_oil = CALCULATE(
COUNT('All Transactions'[TRANS_REF_NO]),
REMOVEFILTERS('DateTable'[Month Date First], 'DateTable'[Date]),
'All Transactions'[TRANS_TYPE] = "Quotation" &&
'All Transactions'[TRANS_DATE] >= mindate &&
'All Transactions'[TRANS_DATE] <= maxdate &&
'All Transactions'[TRANS_DATE_CLOSED] >= mindate &&
'All Transactions'[TRANS_DATE_CLOSED] <= maxdate &&
'All Transactions'[TRANS_STATUS] = "CLOSED WON" &&
'All Transactions'[TRANS_DIVISION] = "Oil"
)It would still be nice to understand why the original code caused the error, or whether it is a bug in Power BI. The fact that the report worked fine when published to the service suggests the latter, but history makes it odds on that my code was incorrect, so I am keen to understand why it failed if anyone has any insight?