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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

HTML not rendering in HTML Content visual

I'm using HTML Content visual.

I created a measure which embeded my HTML code:

``

HTML = "
<!DOCTYPE html>
<html lang=""en"">
<head>
  <meta charset=""UTF-8"">
  <meta name=""viewport"" content=""width=device-width, initial-scale=1.0"">
  <title>Document</title>
  <style>
    .container{
      display: flex;
      justify-content: center;
    }
    .opp-name{
      color:#d70927;
      font-family: Arial, Helvetica, sans-serif;
    }
  </style>
</head>
<body>
  <div class=""container"">
    <p class=""opp-name"">"&SELECTEDVALUE('Opportunité'[Name])&"</p>
    " & SELECTEDVALUE('Opportunity Feed'[Body]) & "
  </div>
</body>
</html>
"

``

'Opportunité'[Name] renders properly, 'Opportunity Feed'[Body] is not rendering.

In 'Opportunity Feed'[Body], it contains HTML tags and content. For example: <p>Email relance sent à Ingrid &gt;&gt; Reponse</p><p>Je reviens vers vous</p>

If I just drop 'Opportunity Feed'[Body] alone in HTML Content visual, it renders properly.

2 ACCEPTED SOLUTIONS
KerKol
Power Participant
Power Participant

Have you checked the granuality? Maybe there are duplicates? 

KerKol_0-1733659077919.png

If you change the SELECTEDVALUE of 'Opportunity Feed'[Body] to MAX of 'Opportunity Feed'[Body] --- you should see it return text?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

KerKol
Power Participant
Power Participant

It's possible you could use CONCATENATEX in your DAX





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
KerKol
Power Participant
Power Participant

Have you checked the granuality? Maybe there are duplicates? 

KerKol_0-1733659077919.png

If you change the SELECTEDVALUE of 'Opportunity Feed'[Body] to MAX of 'Opportunity Feed'[Body] --- you should see it return text?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

You are right. There are duplicate values that I didnt notice: 

Lixin_0-1733741236155.png

In this case, I would like to display both values like this:

30/10/2024 11:15:54

<p> AS Lorea Belette....</p>

17/10/2024 13:34:30

<p> Email relance colle....</p>

 

I'm thinking that I could use JavaScript to make an array and then use HTML to display this in the iframe.

Does this visual also render JS?

No it doesn't. Could you create an index field? it's hard to advise without seeing what you are trying to build...

KerKol_0-1733741732756.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




KerKol
Power Participant
Power Participant

It's possible you could use CONCATENATEX in your DAX





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




lbendlin
Super User
Super User

Most likely it contains too many tags ( like <body>  etc).  See if you can clean that up, or if you can isolate it in its own iframe.

Anonymous
Not applicable

You mean in my 'Opportunity Feed'[Body] column there might be <body> tag?

There isn't any <body> tag, but in some records there are a lot of <p> tag.

To test your solution, I created a new column 'Opportunity Feed'[Test]. In this column, all the records are "<p>Test</p>". 

When I changed my measure from  SELECTEDVALUE('Opportunity Feed'[Body]) to SELECTEDVALUE('Opportunity Feed'[Test]), "Test" is rendered in the iframe, but opportunity name is not rendering any more.

This is really odd.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Users online (15,817)