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...
srbhdix
1 year agoFrequent Visitor
You can try using Format function and convert value to number and then you can do the sum.
Conversion Count Numerator =
VAR mindate = MIN('DateTable'[Date])
VAR maxdate = MAX('DateTable'[Date])
VAR tocount_oil = Format(
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"
),"0")
VAR tocount_dust = Format(
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] = "Dust"
),"0")
VAR tocount = tocount_oil + tocount_dust
RETURN tocount- robmarsh1 year ago
Helper I
Thanks for the rapid reply 😀
I have tried as you suggested, but get the same error! I have never had an issue with the implicit conversion before, but thought that might have something to do with it which is why I went down the ISBLANK route to convert blank values to zeroes.