Forum Discussion
Setting default decimal places in matrix table using theme
Any ideas how to set the default number of decimal places under "Field formatting" in a matrix table? It is "Auto" by default and I'm trying to set it to zero without luck in my JSON theme file. I believe have to use something like this but it is not working:
"pivotTable": {
"*": {
"columnFormatting": [
{
"labelPrecision": 0
}
],
4 Replies
- PaulDBrownCommunity Champion
In theory you should be using measures for value fields, and measures are formatted individually
- vgeldbrHelper IV
Agreed but in this case I have a lot of measures and they are also used elsewhere in drill-through pages where the decimal places are required. So I want to set the display of the number of decimal places in the specific visuals. In this case the matrix table but potentially also in cards and other visuals.
- v-kkf-msftCommunity Support
Hi vgeldbr ,
I don't find appropriate code to set default decimal places in matrix using theme. In my test, when you set decimal places in Field formatting for your measures, it doesn't affect decimal places these measures display in other visuals. This is a screenshot of my test.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.