Forum Discussion
AllanBerces
Post Prodigy
2 years agoIf Zero Blank
Hi good day, can anyone help me to edit my code. I want to add if the targetpercent is 0 make it blank. KPIArrow = VAR up_arrow = UNICHAR(129137) VAR down_arrow = UNICHAR(129139) VAR KPI_ = ...
- 2 years ago
AllanBerces All I can say is that it probably isn't exactly zero then but rather something like -.0001 for example.
Greg_Deckler
Community Champion
2 years agoAllanBerces Try:
KPIArrow =
VAR up_arrow = UNICHAR(129137)
VAR down_arrow = UNICHAR(129139)
VAR KPI_ = [KPI_]
VAR KPI_Ave = [Ave.PT]
VAR TargetPercent = DIVIDE(KPI_Ave - KPI_, KPI_)
RETURN
SWITCH( TRUE(),
TargetPercent = 0, BLANK(),
TargetPercent <0, ROUND(TargetPercent*100,1)&"% "& down_arrow,
ROUND(TargetPercent*100,1)&"% "& up_arrow
)- AllanBerces2 years ago
Post Prodigy
- Greg_Deckler2 years ago
Community Champion
AllanBerces All I can say is that it probably isn't exactly zero then but rather something like -.0001 for example.
- AllanBerces2 years ago
Post Prodigy
Hi Greg_Deckler yes your correct i check on that. thank you for the help