<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Conditional formatting on part of cell in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3487750#M133463</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Assuming you want to change the color of the value from &lt;/SPAN&gt;[DeltaSat (Agent)]&lt;SPAN&gt; based on a condition, you can use the following DAX code:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DeltaSat (Formatage) =
VAR AgentColor = IF([DeltaSat (Agent)] &amp;lt; 0.2, "Red", "Black")  -- Define your condition here
VAR AgentText = FORMAT([DeltaSat (Agent)], "Percent")
VAR EquipeText = FORMAT([DeltaSat (Equipe)], "Percent")
VAR CompétenceText = FORMAT([DeltaSat (Compétence)], "Percent")
RETURN
    SWITCH(
        TRUE(),
        [DeltaSat (Agent)] &amp;lt; 0.2, "&amp;lt;span style='color:" &amp;amp; AgentColor &amp;amp; "'&amp;gt;" &amp;amp; AgentText &amp;amp; "&amp;lt;/span&amp;gt; | " &amp;amp; EquipeText &amp;amp; " | " &amp;amp; CompétenceText,
        TRUE(), AgentText &amp;amp; " | " &amp;amp; EquipeText &amp;amp; " | " &amp;amp; CompétenceText
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this code, we first define a variable AgentColor that checks a condition for [DeltaSat (Agent)] and sets the color to "Red" if the condition is met, otherwise "Black". You can change the condition as per your requirement.&lt;/P&gt;&lt;P&gt;Then, we use the SWITCH function to conditionally format the text in the DeltaSat (Formatage) column. If the condition is met, it wraps the [DeltaSat (Agent)] value in an HTML span element with the specified color.&lt;/P&gt;&lt;P&gt;Make sure you replace the condition in IF with your specific criteria for changing the color, and adjust the color and formatting as needed. This code assumes that you are working with a table that can interpret HTML styling for text color.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 13:28:03 GMT</pubDate>
    <dc:creator>_elbpower</dc:creator>
    <dc:date>2023-10-20T13:28:03Z</dc:date>
    <item>
      <title>Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3487657#M133457</link>
      <description>&lt;P&gt;Good morning,&lt;BR /&gt;In a table, I use concatenation to group 3 values in the same cell.&lt;BR /&gt;I would like to be able to change the color of just one of the 3 values based on it.&lt;BR /&gt;How to do ?&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;Mathieu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DAX:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DeltaSat (Formatage) = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;([DeltaSat (Agent)],&lt;/SPAN&gt;&lt;SPAN&gt;"Percent"&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;" | "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;([DeltaSat (Equipe)],&lt;/SPAN&gt;&lt;SPAN&gt;"Percent"&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;" | "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;([DeltaSat (Compétence)],&lt;/SPAN&gt;&lt;SPAN&gt;"Percent"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Oct 2023 12:40:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3487657#M133457</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-10-20T12:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3487750#M133463</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Assuming you want to change the color of the value from &lt;/SPAN&gt;[DeltaSat (Agent)]&lt;SPAN&gt; based on a condition, you can use the following DAX code:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DeltaSat (Formatage) =
VAR AgentColor = IF([DeltaSat (Agent)] &amp;lt; 0.2, "Red", "Black")  -- Define your condition here
VAR AgentText = FORMAT([DeltaSat (Agent)], "Percent")
VAR EquipeText = FORMAT([DeltaSat (Equipe)], "Percent")
VAR CompétenceText = FORMAT([DeltaSat (Compétence)], "Percent")
RETURN
    SWITCH(
        TRUE(),
        [DeltaSat (Agent)] &amp;lt; 0.2, "&amp;lt;span style='color:" &amp;amp; AgentColor &amp;amp; "'&amp;gt;" &amp;amp; AgentText &amp;amp; "&amp;lt;/span&amp;gt; | " &amp;amp; EquipeText &amp;amp; " | " &amp;amp; CompétenceText,
        TRUE(), AgentText &amp;amp; " | " &amp;amp; EquipeText &amp;amp; " | " &amp;amp; CompétenceText
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this code, we first define a variable AgentColor that checks a condition for [DeltaSat (Agent)] and sets the color to "Red" if the condition is met, otherwise "Black". You can change the condition as per your requirement.&lt;/P&gt;&lt;P&gt;Then, we use the SWITCH function to conditionally format the text in the DeltaSat (Formatage) column. If the condition is met, it wraps the [DeltaSat (Agent)] value in an HTML span element with the specified color.&lt;/P&gt;&lt;P&gt;Make sure you replace the condition in IF with your specific criteria for changing the color, and adjust the color and formatting as needed. This code assumes that you are working with a table that can interpret HTML styling for text color.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 13:28:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3487750#M133463</guid>
      <dc:creator>_elbpower</dc:creator>
      <dc:date>2023-10-20T13:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3487763#M133465</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="622632" data-lia-user-login="_elbpower" class="lia-mention lia-mention-user"&gt;_elbpower&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for your return.&lt;BR /&gt;Are you sure the HTML code works in DAX, I tested it, but without success?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mathieu&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 13:35:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3487763#M133465</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-10-20T13:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3488067#M133483</link>
      <description>&lt;P&gt;can you please share your measure code here&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 15:19:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3488067#M133483</guid>
      <dc:creator>_elbpower</dc:creator>
      <dc:date>2023-10-20T15:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3488130#M133491</link>
      <description>&lt;P&gt;Here is what I did to test :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DeltaSat (Formatage) =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"&amp;lt;span style='color:red'&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[DeltaSat (Agent)]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Percent"&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;"&amp;lt;/span&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;" | "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[DeltaSat (Equipe)]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Percent"&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;" | "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[DeltaSat (Compétence)]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Percent"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Oct 2023 15:32:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3488130#M133491</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-10-20T15:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3488928#M133528</link>
      <description>&lt;P&gt;You can use a HTML visual and watch this video:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;UpVote the idea &lt;A href="https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=3a38cc1c-e96f-ee11-a81c-6045bd7e24a3" target="_self"&gt;here&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;div data-video-id="https://www.youtube.com/watch?v=IejbzCPv4_c" data-video-remote-vid="https://www.youtube.com/watch?v=IejbzCPv4_c" class="lia-video-container lia-media-is-center lia-media-size-small"&gt;&lt;iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIejbzCPv4_c%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIejbzCPv4_c&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIejbzCPv4_c%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" allowfullscreen="" style="max-width: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 08:27:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3488928#M133528</guid>
      <dc:creator>_elbpower</dc:creator>
      <dc:date>2023-10-21T08:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3495564#M133913</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="622632" data-lia-user-login="_elbpower" class="lia-mention lia-mention-user"&gt;_elbpower&lt;/a&gt;&amp;nbsp;&amp;nbsp;It's super complicated &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 07:20:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3495564#M133913</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-10-25T07:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3495643#M133918</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="622632" data-lia-user-login="_elbpower" class="lia-mention lia-mention-user"&gt;_elbpower&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am testing the 2nd solution&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 07:45:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3495643#M133918</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-10-25T07:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3512518#M134814</link>
      <description>&lt;P&gt;Use &lt;A href="https://appsource.microsoft.com/en-us/product/power-bi-visuals/foxolabsopcpvtltd1698255416379.tabulator-custom-visual" target="_self"&gt;Tabulator PowerBI Visual&lt;/A&gt;&lt;BR /&gt;You can use this table in your report and just create a HTML measure like i have sent above. This is working fine,&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 15:52:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3512518#M134814</guid>
      <dc:creator>_elbpower</dc:creator>
      <dc:date>2023-11-02T15:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting on part of cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3517518#M135076</link>
      <description>&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Create-Table/m-p/3507026/highlight/true#M45190" target="_blank"&gt;Solved: Re: Create Table - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 10:57:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-on-part-of-cell/m-p/3517518#M135076</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-11-06T10:57:22Z</dc:date>
    </item>
  </channel>
</rss>

