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
Miska
Helper I
Helper I

Bold certain part of text on a card using Selected value from filter selection

Hi!

 

I want to bold certain part of a text that I have created a meassure from the selected values based on filters. 

Eq: 2019/2020 Crocin(ESS) Threshold 77,072 Total Consumed. As you see ESS and the numbers are in Bold , how would I achieve that.

 

My Dax Meassure is :

var selectedYear = SELECTEDVALUE('ADMS Outage Repair PROD'[Outage Reported Date].[Year])
var ny = selectedYear + 1
return CONCATENATE(
CONCATENATE(
CONCATENATE(
CONCATENATE(
CONCATENATE(
CONVERT(selectedYear, STRING) , "/"), CONVERT(ny, STRING)), " Crocin (ESS) Threshold "), [FY Threshold]), " Total Consumed")
 
Help will be greatly appreciated
2 ACCEPTED SOLUTIONS
v-kkf-msft
Community Support
Community Support

Hi @Miska ,

 

Create the HTML table like this:

 

image.png

 

Then create measure, and put the measure into HTML Content or HTML Text Styler visuals.

 

 

Measure = 
var selectedYear = SELECTEDVALUE('ADMS Outage Repair PROD'[Outage Reported Date].[Year])
var ny = selectedYear + 1
return 
    MAX('HTML'[Body1]) & 
        CONVERT(selectedYear, STRING) & "/" & CONVERT(ny, STRING) & " Crocin (" &
    MAX('HTML'[Body2]) & "ESS" & 
    MAX('HTML'[Body3]) & ") Threshold " & 
    MAX('HTML'[Body2]) & [FY Threshold] & 
    MAX('HTML'[Body3]) & " Total Consumed" &
    MAX('HTML'[Body4])

 

image.png

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,
Winniz

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

 

View solution in original post

Works like a charm.Thanks.

View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @Miska ,

 

Create the HTML table like this:

 

image.png

 

Then create measure, and put the measure into HTML Content or HTML Text Styler visuals.

 

 

Measure = 
var selectedYear = SELECTEDVALUE('ADMS Outage Repair PROD'[Outage Reported Date].[Year])
var ny = selectedYear + 1
return 
    MAX('HTML'[Body1]) & 
        CONVERT(selectedYear, STRING) & "/" & CONVERT(ny, STRING) & " Crocin (" &
    MAX('HTML'[Body2]) & "ESS" & 
    MAX('HTML'[Body3]) & ") Threshold " & 
    MAX('HTML'[Body2]) & [FY Threshold] & 
    MAX('HTML'[Body3]) & " Total Consumed" &
    MAX('HTML'[Body4])

 

image.png

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,
Winniz

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

 

Works like a charm.Thanks.

amitchandak
Super User
Super User

@Miska , I doubt you can do that.

But if can convert this to HTML code, the HTML content might help . They have given some example on the link too

https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa200001930?tab=overview

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.

Top Solution Authors