Forum Discussion
Calculate % based off total, rather than selected
This is what I entered with my true table/column names.
%Cancelled = COUNTX(FILTER('Dec 2016 Closed Changes',
'Dec 2016 Closed Changes'[Closure code]= "Cancelled"),
'Dec 2016 Closed Changes'[Closure code] / [TotalCloseCode])
Your formula had semi-colons, but when I went to enter that, it underlined them in red that there were issues - so i switched then to commas. Hopefully that didn't change anything.
I get this error
"Cannot convert value 'Success' of type Text to type Number."
"Success" is one of the possible closure code values along with Cancelled. But - not sure why its erroring on that value since I'm searching for Cancelled ?
%Cancelled = COUNTX(FILTER('Dec 2016 Closed Changes',
'Dec 2016 Closed Changes'[Closure code]= "Cancelled"),
'Dec 2016 Closed Changes'[Closure code]) / [TotalCloseCode]
The semicollons are because I'm using the portuguese version...
ANd I tink now it should work, you put the last parenthesis after the division (/) and then power bi were trying to calculate [Closure Code]/measure. That's were the error came from. =)