Forum Discussion
HTML not rendering in HTML Content visual
I'm using HTML Content visual.
I created a measure which embeded my HTML code:
``
``
'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 >> Reponse</p><p>Je reviens vers vous</p>
If I just drop 'Opportunity Feed'[Body] alone in HTML Content visual, it renders properly.
Have you checked the granuality? Maybe there are duplicates?
If you change the SELECTEDVALUE of 'Opportunity Feed'[Body] to MAX of 'Opportunity Feed'[Body] --- you should see it return text?
It's possible you could use CONCATENATEX in your DAX
6 Replies
- KerKolPower Participant
Have you checked the granuality? Maybe there are duplicates?
If you change the SELECTEDVALUE of 'Opportunity Feed'[Body] to MAX of 'Opportunity Feed'[Body] --- you should see it return text?
- AnonymousNot applicable
You are right. There are duplicate values that I didnt notice:
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?
- KerKolPower Participant
No it doesn't. Could you create an index field? it's hard to advise without seeing what you are trying to build...
- lbendlinSuper 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.
- AnonymousNot 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.