<?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: Power BI time functions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3370374#M126820</link>
    <description>&lt;P&gt;This works but the problem is if I want column B to have AOT and ABC in one row it does not work. The way the data is pulled in is in some rows of columb B they have multiple (codes). How do I have power bi choose the code with the lowest timeframe. I tried using LOOKUPVALUE but it will not recognize LOOKUPVALUE people have been using power querey for that function which I do not have. Any advice?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 13:43:13 GMT</pubDate>
    <dc:creator>Npg3</dc:creator>
    <dc:date>2023-08-08T13:43:13Z</dc:date>
    <item>
      <title>Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367039#M126633</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a function in power bi to creates a new colum and adds a certain amount of time depending on a key word that is a period of time in a different column.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;row 1 &amp;nbsp;includes a date in column A and word in column B ( a word like ATO is 6 months) so when row 1 column B is ATO it adds 6 months onto row 1 column A and the new date is placed in new row 1 column C.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically the amount of time added onto the row in column A is dependent on word in the corresponding row of column B&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2023 16:16:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367039#M126633</guid>
      <dc:creator>Npg3</dc:creator>
      <dc:date>2023-08-06T16:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367086#M126634</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="599350" data-lia-user-login="Npg3" class="lia-mention lia-mention-user"&gt;Npg3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It depends. If not too many text variants and if only number of months to be added then you may try&lt;/P&gt;
&lt;P&gt;Column C =&lt;BR /&gt;EDATE (&lt;BR /&gt;'Table'[Column A],&lt;BR /&gt;SWITCH ( 'Table'[Column B], "AOT", 6, "XYZ", 3, "ABC", 1 )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2023 17:30:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367086#M126634</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-08-06T17:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367101#M126635</link>
      <description>&lt;P&gt;It shows expression.error: the name 'EDATE' wasn't recognized. Make sure it's spelled right&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2023 17:50:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367101#M126635</guid>
      <dc:creator>Npg3</dc:creator>
      <dc:date>2023-08-06T17:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367149#M126637</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="599350" data-lia-user-login="Npg3" class="lia-mention lia-mention-user"&gt;Npg3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code is for DAX calculated column not Power Query M language.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2023 18:56:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367149#M126637</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-08-06T18:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367150#M126638</link>
      <description>&lt;P&gt;How can I create this function in a custom column in power BI?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2023 18:58:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367150#M126638</guid>
      <dc:creator>Npg3</dc:creator>
      <dc:date>2023-08-06T18:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367158#M126641</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="599350" data-lia-user-login="Npg3" class="lia-mention lia-mention-user"&gt;Npg3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may insert conditional column. Should be straightforward.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2023 19:36:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3367158#M126641</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-08-06T19:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3369592#M126774</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="599350" data-lia-user-login="Npg3" class="lia-mention lia-mention-user"&gt;Npg3&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try M Code as below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date.AddMonths(
    [Column A],
    if [Column B] = "AOT" then 6 
    else if [Column B] = "XYZ" then 3 
    else if [Column B] = "ABC" then 1 
    else null)&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 06:19:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3369592#M126774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-08T06:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI time functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3370374#M126820</link>
      <description>&lt;P&gt;This works but the problem is if I want column B to have AOT and ABC in one row it does not work. The way the data is pulled in is in some rows of columb B they have multiple (codes). How do I have power bi choose the code with the lowest timeframe. I tried using LOOKUPVALUE but it will not recognize LOOKUPVALUE people have been using power querey for that function which I do not have. Any advice?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 13:43:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-time-functions/m-p/3370374#M126820</guid>
      <dc:creator>Npg3</dc:creator>
      <dc:date>2023-08-08T13:43:13Z</dc:date>
    </item>
  </channel>
</rss>

