Forum Discussion
lennox25
Post Patron
2 years agoHelp to create % Measure
I have created a % measure as follows :
% of Yellow = divide([No of Yellow],[Count of Category])*100-100
The result is correct when unformatted and left as general- however it is showing a minus value e.g -99.96. I want it to show 99.96% When I format to % it shows incorrectly as -9995.54%
The measures No of Yellow is -
No of Yellow = if(ISBLANK(CALCULATE(
DISTINCTCOUNT(table [ID]),
FILTER(Table, Table[Colour] = "Yellow"))),0,CALCULATE(
DISTINCTCOUNT(table [ID]),
FILTER (Table, Table [Colour] = "Yellow")))
and Count of Category is
Count of Category = CALCULATE(COUNT(Table [Category]) +0 )
Can anyone help?
Hey lennox25 ,
if you want to use the format as "percentage" option, do not multiply by 100. If you want to show the result as poisitive consider using the ABS function like so:
% of Yellow = ABS(divide([No of Yellow],[Count of Category])-1)Hopefully, this provides what you are looking for.
Regards,Tom
2 Replies
- TomMartens
Super User
Hey lennox25 ,
if you want to use the format as "percentage" option, do not multiply by 100. If you want to show the result as poisitive consider using the ABS function like so:
% of Yellow = ABS(divide([No of Yellow],[Count of Category])-1)Hopefully, this provides what you are looking for.
Regards,Tom
- lennox25
Post Patron
Kudos to you 🙂 Thank you so much!!