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.

Reply
Anonymous
Not applicable

Changing FONT Style/Size/Color in a DAX

Hi Super Users,

I need to show dynamic insights about my data.
I am creating a DAX using concatenate function and the measure and finally displaying it in a KPI Card.
The challenge is i need to highlight my measure used in a different color/size and style so its easily readable. this has to be controlled within a DAX.

Example : This is what i need to show
Sales for CY has incraesed by 20%


If i use the following measure:
Measure = "Sales for CY has increased by" & [Sales Growth%]

and use this in my KPI card - it will not highlight 20%(which i want to be highlighted in a different color/fornt style/size)

Pls help

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you tell me if @sm_talha 's post helps you a little? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.Hope to hear from you‌‌

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could go to Format pane-->Goal -->Change label and value and percentage 's color/ font...

Eyelyn9_0-1631588038899.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@Anonymous 

Power BI does not provide such options yet for you to partially format text. as an alternative, you can create two measures one for the text "Sales for CY has increased by" and another one for your measure % which is 20%. then use two cards, shapes, or buttons to assign using the Text property, do the alignment right, and group these two objects to get the desired results.

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

AllisonKennedy
Super User
Super User

@Anonymous If you use a card visual, you can conditional format the value using conditional formatting. https://radacad.com/enhance-the-card-visual-in-power-bi-with-conditional-formatting

 

The new text box allows you to add data values and format them differently from the surrounding text: https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-smart-narrative 

 

There are also custom visuals, such as Enlighten Data Story, which allow you to format text differently from the data values. 

 

Since the card visual is the only one that will allow conditional formatting based on the data value, you may need to use a combination of these to get your desired result. 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.