Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

change the color of the data value

Hi Expert,

 

I would like to ask how to change the color of the data base on the value.  Like if the value is 1 red if the value is 0 black.

Im' using the card visual.

 

Thank you for your suggestion.

 

Mae

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @bazam,

 

For built-in card visual, conditional formatting is not supported now, so we can't set color based on a rule. You can vote this same idea: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19516645-conditional-formating-fo...

 

To work around the issue, you can try the custom visual  Card with States by OKViz

 

q7.PNGq8.PNG

 

Best Regards,
Qiuyun Yu 

bazam
Frequent Visitor

thanks for your quick reply  Yu,

 

I tried it and it works. My question is how i will increase the data font to 80 in card with states?  Currently my using Card visulization and i use the below to increase the font.

 

{
"name": "MYTHEME",
"visualStyles": {
"card": {
"*": {
"labels": [
{
"fontSize":80,
"fontFamily": "Calibri"
}
]
}
}
}
}

v-qiuyu-msft
Community Support

Hi @bazam,

 

Based on my research, the valid font size for the custom visual Card with States by OKViz is 40. 

 

q3.PNG

 

As this custom visual is developed by OKViz, I would suggest you contact the author for help: https://okviz.com/support/

 

Best Regards,
Qiuyun Yu 

bazam
Frequent Visitor

thank you for your reply.

 

is there anyway to use .json? like the one in card visual?

v-qiuyu-msft
Community Support

Hi @bazam,

 

I don't think the custom visual Card with States by OKViz will accept the font size specified in custom theme .json file if the value is 80 which is large than 40. 

 

The better way is to contact the developer to increase the maximum font value for this visual. 

 

Best Regards,
Qiuyun Yu 

bazam
Frequent Visitor

Hi,

 

How about the Advance Card Visualization I can use the json code? to increase the text size?

v-qiuyu-msft
Community Support

Hi @bazam,

 

Based on my research, we can't specify font size for Avdvanced Card custom visual in report theme json file. As you can see all available avlues for visualname parameter in json file are built-in visuals: https://docs.microsoft.com/en-us/power-bi/desktop-report-themes#json-file-element-definitions

 

 

Best Regards,
Qiuyun Yu 

bazam
Frequent Visitor

thank you for  your reply Yu,

 

Maybe you have an idea; currently I have a dashboard like the below, I used the card visualization and I used .json to increase the font.  But the management required me to change the color of the value if more than 1 red and if 0 black.Capture.JPG

v-qiuyu-msft
Community Support

Hi @bazam,

 

As I mentioned in my first reply, conditional formatting doesn't support for built-in card visual. 

You can use custom visual Card with States by OKViz instead. Then change the font size and set color condition in Formatting pane. 

 

Best Regards,
Qiuyun Yu 

 

 

bazam
Frequent Visitor

thank you for your reply.

 

yes i tried to use the Card with state but i have the issue on the font size.  By the way im trying to use the Table Visualization which I can able to change the font size via json. My question now is how to change the color like sample if the value is greater than 1 red and if the value is 0 is black.

 

Thank you for your support.