Add comma separator in KPI visual

Hi I have the following KPI visual in a card and the formula below shows changes to prior year, see image #1. I want to have the thousands separated by a comma. So it should show (79,326).

Image #1

Can someone help?

I have attached a working file if you need it.

Thank you
WIP - Template.pbit (691.8 KB)

Hello @ysherriff,

Thank You for posting your query onto the Forum.

Well, the file which you’ve provided asks for the credentials so couldn’t open it. Below is the screenshot provided for reference -

But you can try the below provided measure and I guess that should work -

PY KPI = 
VAR _Difference =
[YTD] - [PY]

VAR _Direction = 
SWITCH( TRUE() ,
	_Difference > 0 , "↑" ,
	_Difference < 0 , "↓" ,
	"🔴" )

VAR _Percentage =
DIVIDE( _Difference , [PY] , 0 )

VAR _Results =
_Direction & " " & FORMAT( _Percentage , "##.##%" ) & " (" & FORMAT( [PY] , "#,##0" ) & ")"

Hoping you find this useful and meets your requirements that you’ve been looking for.

Thanks and Warm Regards,
Harsh

2 Likes

Perfect Harsh!!! :smiley:

Thanks a million

Hello @ysherriff,

You’re Welcome!!!

I’m glad that I was able to assist you.

By the way, you might now have to format that thanks into the millions format. :joy:

Have a nice weekend!

Thanks and Warm Regards,
Harsh