Forum Discussion
How to format part of a dynamic text to be bold with different font color
Hi,
I have a dynamic string to show values based on swtich statements. I need to format the value to be bold and different color.
to
Below is the dax code : Please advise on code to format the color and bold as above.
return
- Anonymous2 years ago
There are several HTML visuals available that might help, e.g. HTML Text Styler or HTML content. HTML Text Styler for example, in HTML Text Styler, the measure below will create this output:
Sample = CONCATENATE(" <span style= 'color:rgb(0, 0, 255);'><b>"&[This is the Text]&"</b></span>", "; data lagged due to data stabilisation")You can replace the 'This is the Text' measure with your own code and the second part of the CONCATENATE you could replace the simple string with another measure.You can find a demo report for HTML Text Styler here: Bold, italic, underline etc. in Power BI - BI Samurai
and here Format positive and negative values in Power BI - BI Samurai
HTML Content has a demo here: Simple Worked Example | HTML Content - Custom Visual for Power BI (html-content.com)
3 Replies
- AnonymousNot applicable
There are several HTML visuals available that might help, e.g. HTML Text Styler or HTML content. HTML Text Styler for example, in HTML Text Styler, the measure below will create this output:
Sample = CONCATENATE(" <span style= 'color:rgb(0, 0, 255);'><b>"&[This is the Text]&"</b></span>", "; data lagged due to data stabilisation")You can replace the 'This is the Text' measure with your own code and the second part of the CONCATENATE you could replace the simple string with another measure.You can find a demo report for HTML Text Styler here: Bold, italic, underline etc. in Power BI - BI Samurai
and here Format positive and negative values in Power BI - BI Samurai
HTML Content has a demo here: Simple Worked Example | HTML Content - Custom Visual for Power BI (html-content.com)
- Sara_JFrequent Visitor
Thank you for the solution.
i downloaded the HTML visualization . While few available not displaying the results on Cloud service . HTML text styler does display the expected solution.
How ever i still need it to approved by my organization and needs licensing.
Thanks again!
- AnonymousNot applicable
Good luck!