Reply
Highlighted
Frequent Visitor
Posts: 4
Registered: ‎03-15-2017
Accepted Solution

Number Formatting Function

In my custom visual, I'm trying to get the format from a measure. This passes the format of the measure to the ts file:

 

 

dataViews[0].categorical.values[0].source.format

It produces a value like: '0.0 %;-0.0 %;0.0 %' for a percent with 1 decimal and '\$#,0;(\$#,0);\$#,0' for a dollar amount.

 

My question is, how do I apply that to a number? There has to be a standard function, right?

 

Thanks

 


Accepted Solutions
Senior Member
Posts: 269
Registered: ‎07-09-2016

Re: Number Formatting Function

@rgodfrey,

 

Based on my research, you may use valueFormatter module in Formatting Utils.

Regards,
Sam

View solution in original post


All Replies
Senior Member
Posts: 269
Registered: ‎07-09-2016

Re: Number Formatting Function

@rgodfrey,

 

Based on my research, you may use valueFormatter module in Formatting Utils.

Regards,
Sam