<?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: Plotting numbers on Matrix Visual with if statement in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Plotting-numbers-on-Matrix-Visual-with-if-statement/m-p/2810424#M88976</link>
    <description>&lt;P&gt;Is that the full measure code?&amp;nbsp; What is ProjectStatus used for?&lt;/P&gt;</description>
    <pubDate>Sat, 01 Oct 2022 21:49:51 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2022-10-01T21:49:51Z</dc:date>
    <item>
      <title>Plotting numbers on Matrix Visual with if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Plotting-numbers-on-Matrix-Visual-with-if-statement/m-p/2808754#M88762</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I’m trying to build to custom “Gantt Chart” as shown below using the native Matrix visual (do not want to use external visuals nor Microsoft Gantt Chart).&lt;/P&gt;&lt;P&gt;What I’m trying to do is, if a particular task / activity has a start date (i.e. 30/07/2022) that is &amp;lt;= today(), then give me a 1, that is plotted on the matrix, which using the example should plot 1 next to the activity in 2022 July and 2022 August.&lt;/P&gt;&lt;P&gt;Similarly, if the activity has end_date that is &amp;gt; today() then give me a 2, that is plotted on the matrix, otherwise if the activity hasn’t started then give me a 0.&lt;/P&gt;&lt;P&gt;My current dax is as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR Start_date =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIN(Task_All[___START_DATE]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; REMOVEFILTERS(FinishCalendar)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR End_Date =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAX(Task_All[___END_DATE]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; REMOVEFILTERS(FinishCalendar)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR Min_date = MIN(FinishCalendar[Date])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR ProjectPeriod =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min_date &amp;gt;= Start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;amp; Min_date &amp;lt;= End_Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR ProjectStatus =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIN(Task_All[___IsDelivered]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; REMOVEFILTERS(FinishCalendar[Date])&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;SWITCH(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRUE(),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProjectPeriod &amp;amp;&amp;amp; FILTER(Task_All,Task_All[___START_DATE] &amp;lt;=TODAY()), 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProjectPeriod &amp;amp;&amp;amp; FILTER(Task_All,Task_All[___END_DATE] &amp;gt; TODAY()), 2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 15:22:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Plotting-numbers-on-Matrix-Visual-with-if-statement/m-p/2808754#M88762</guid>
      <dc:creator>Mido99</dc:creator>
      <dc:date>2022-09-30T15:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting numbers on Matrix Visual with if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Plotting-numbers-on-Matrix-Visual-with-if-statement/m-p/2810424#M88976</link>
      <description>&lt;P&gt;Is that the full measure code?&amp;nbsp; What is ProjectStatus used for?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 21:49:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Plotting-numbers-on-Matrix-Visual-with-if-statement/m-p/2810424#M88976</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-10-01T21:49:51Z</dc:date>
    </item>
  </channel>
</rss>

