<?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, Expiry dates on Matrix Visual in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3975393#M154142</link>
    <description>&lt;P&gt;I am having nearly the same problem and am eager to find a solution.&amp;nbsp; I need conditional formatting for&amp;nbsp; date fields in a matrix visual with the value being compared to the compliance date for the specific training category in the Courses table.&amp;nbsp; If the value date is earlier than the compliance date, the value would be bold red text and if the value date is 1-90 days after the compliance date, the value would be highlighed yellow.&amp;nbsp; There are some trainings that only have to be completed one time and the compliance date for those is blank in the Courses table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due to my organization's IT policies, I'm not able to provide a link to even sample data but have provided screen shots of my report and the relationships established in my data model in hopes that will be enough information.&amp;nbsp; I can provide more screenshots if it will help to develop a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2024 21:01:55 GMT</pubDate>
    <dc:creator>dporter1111</dc:creator>
    <dc:date>2024-06-05T21:01:55Z</dc:date>
    <item>
      <title>Conditional Formatting, Expiry dates on Matrix Visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3868840#M151139</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a set of data tables, which I have used to populate a Matrix table to give me a training table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added a measure with the following code, to show when things were still in date, within 30 days of expiry, and over 1 year since the date trained:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DateStatus =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;TodayDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CourseDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'EmployeeCourseLog'&lt;/SPAN&gt;&lt;SPAN&gt;[CourseDate]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CourseDate&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;TodayDate&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;365&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Pink"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CourseDate&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;TodayDate&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;335&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Light Yellow"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;"Light Green"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Which worked beautifully and created this:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT, now Senior management want difference training courses to be refreshed at different times, some every year, some every 2 years.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been trying all sorts to get it to work, but I'm just stuck.&amp;nbsp; Here is a listof my tables, where you can see the "Expiration Date" Measure nestled in the "EmployeeCourseLog" table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help with code that will separate conditional formatting by column. So, for example:&lt;/P&gt;&lt;P&gt;Cyber Security awareness - Green within 1 year, Yellow within 30 days of the year date, and red if past 1 year.&lt;/P&gt;&lt;P&gt;Equality, Diversity - Green within 2 years, Yellow within 30 days of the 2 year date, and red if past 2 years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I started messing with, and I feel like I'm on the right lines, but I'm lacking further knowledge to make it work:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Expiration Date =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;SelectedColumn&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'CourseTitles'&lt;/SPAN&gt;&lt;SPAN&gt;[CourseTitle]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SelectedColumn&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Cyber Security Awareness"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'EmployeeCourseLog'&lt;/SPAN&gt;&lt;SPAN&gt;[CourseDate]&lt;/SPAN&gt;&lt;SPAN&gt;) + &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;365&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;// 1 year expiry, "Pink"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;"Light Green"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope what I'm asking has made sense? Really hope that a) it's possible and b) someone can help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Apr 2024 15:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3868840#M151139</guid>
      <dc:creator>Drae</dc:creator>
      <dc:date>2024-04-25T15:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting, Expiry dates on Matrix Visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3869438#M151153</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 22:54:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3869438#M151153</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-25T22:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting, Expiry dates on Matrix Visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3975393#M154142</link>
      <description>&lt;P&gt;I am having nearly the same problem and am eager to find a solution.&amp;nbsp; I need conditional formatting for&amp;nbsp; date fields in a matrix visual with the value being compared to the compliance date for the specific training category in the Courses table.&amp;nbsp; If the value date is earlier than the compliance date, the value would be bold red text and if the value date is 1-90 days after the compliance date, the value would be highlighed yellow.&amp;nbsp; There are some trainings that only have to be completed one time and the compliance date for those is blank in the Courses table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due to my organization's IT policies, I'm not able to provide a link to even sample data but have provided screen shots of my report and the relationships established in my data model in hopes that will be enough information.&amp;nbsp; I can provide more screenshots if it will help to develop a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 21:01:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3975393#M154142</guid>
      <dc:creator>dporter1111</dc:creator>
      <dc:date>2024-06-05T21:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting, Expiry dates on Matrix Visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3975400#M154143</link>
      <description>&lt;P&gt;I cannot assist you if you are unable to provide sample data. I hope someone else can help you further.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 21:07:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3975400#M154143</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-05T21:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting, Expiry dates on Matrix Visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3976585#M154184</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm just trying to figure out how to upload the data. Currently covering multiple absences at work so I'm a little slow to respond at the moment. Sorry &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 08:45:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Expiry-dates-on-Matrix-Visual/m-p/3976585#M154184</guid>
      <dc:creator>Drae</dc:creator>
      <dc:date>2024-06-06T08:45:22Z</dc:date>
    </item>
  </channel>
</rss>

