<?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: DAX column to get new date column based on existing date column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2319773#M57913</link>
    <description>&lt;P&gt;The Metric_Name column didn't exist in the model. The values in that column come from one more column condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first 3 values coming from "Status" column and last value is logical cond on "Dummy" column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Metric_Name --&amp;gt; Status Column (&amp;nbsp;&lt;SPAN&gt;Current , Closed, onHold ) and 'Metric1' ---&amp;gt; if(Dummy=true, 1, 0) for measure.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So how to write this new dynamic Metric_Name in the DAX?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Feb 2022 12:22:43 GMT</pubDate>
    <dc:creator>datpbi_newbie</dc:creator>
    <dc:date>2022-02-04T12:22:43Z</dc:date>
    <item>
      <title>DAX column to get new date column based on existing date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2318935#M57873</link>
      <description>&lt;P&gt;Hi I am very new to Power BI and coming from SQL background.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a new Matrix Object with Metric_Name, Target, and Month_Year dimensions and No of Requests as Fact.&lt;/P&gt;&lt;P&gt;The Metric_Name is having values like "Metric 1', 'Current', 'Closed', 'onHold' and column values partially exist in one of the columns in the model.&lt;/P&gt;&lt;P&gt;Metric_Name --&amp;gt; Status column (Current , Closed, onHold), Metric 1 --&amp;gt; if(Dummy = 'True', Metric1)&lt;/P&gt;&lt;P&gt;Target --&amp;gt; This column not in the model and values are statis as per Metric Name - Current - 5, Closed - 10, onHold - 3, Metric1&amp;nbsp; - 1&lt;/P&gt;&lt;P&gt;For the Month_Year dimension, I need to limit the data latest 3 months meaning if the Max Request date is Jan 20 2022, I need to show Jan 2022, Dec 2021, and Nov 2021 in the Matrix table object. I have a Request_Date in the model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to create these in DAX measure?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, how to get started with DAX and share any good material to get started&lt;/P&gt;&lt;P&gt;No of Requests- Count of request id&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 03:47:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2318935#M57873</guid>
      <dc:creator>datpbi_newbie</dc:creator>
      <dc:date>2022-02-04T03:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: DAX column to get new date column based on existing date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2319141#M57879</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Since you have the data for the rest you only need to add measure for target. For that try something like this: target =&lt;BR /&gt;SWITCH(MAX(Table[Metric Name]),"Current",5&lt;BR /&gt;"Closed",10,&lt;BR /&gt;"onHold",3,&amp;nbsp;&lt;BR /&gt;"Mteric1",1)&lt;BR /&gt;&lt;BR /&gt;You can get the last 3 months by placing your date column as a filter on your visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 06:22:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2319141#M57879</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-02-04T06:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: DAX column to get new date column based on existing date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2319762#M57912</link>
      <description>&lt;P&gt;Thanks for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is relative date option use Start Of the Month? Also, I need to calculate last 3 months based max date in the request_date. The current max date is Jan-20 and today date is Feb 4th. So the chart should show only Nov-01-21 to Jan-20-22 only?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 12:18:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2319762#M57912</guid>
      <dc:creator>datpbi_newbie</dc:creator>
      <dc:date>2022-02-04T12:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: DAX column to get new date column based on existing date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2319773#M57913</link>
      <description>&lt;P&gt;The Metric_Name column didn't exist in the model. The values in that column come from one more column condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first 3 values coming from "Status" column and last value is logical cond on "Dummy" column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Metric_Name --&amp;gt; Status Column (&amp;nbsp;&lt;SPAN&gt;Current , Closed, onHold ) and 'Metric1' ---&amp;gt; if(Dummy=true, 1, 0) for measure.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So how to write this new dynamic Metric_Name in the DAX?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 12:22:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2319773#M57913</guid>
      <dc:creator>datpbi_newbie</dc:creator>
      <dc:date>2022-02-04T12:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: DAX column to get new date column based on existing date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2327485#M58328</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356873" data-lia-user-login="datpbi_newbie" class="lia-mention lia-mention-user"&gt;datpbi_newbie&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding limiting the last 3 months of data, you can try the following methods.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _Startdate =
     SELECTEDVALUE('Table'[Request_Date])-90
VAR _Enddate =
    SELECTEDVALUE('Table'[Request_Date])
RETURN
    IF (
        SELECTEDVALUE('Date'[Date]) &amp;gt;= _Startdate
            &amp;amp;&amp;amp; SELECTEDVALUE('Date'[Date]) &amp;lt;= _Enddate,
        1,
        0
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Put Measure into Filters, set to equal 1.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;When the request date is selected data from the last 90 days will appear.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&amp;nbsp;Regarding the other requirements you mentioned, can you provide images or simple PBIX files about the source data for testing? And show the output you expect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 07:30:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-column-to-get-new-date-column-based-on-existing-date-column/m-p/2327485#M58328</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-02-09T07:30:37Z</dc:date>
    </item>
  </channel>
</rss>

