<?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: add a column that puts PM whenever power bi finds that the date is the previous month just gone in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295250#M170481</link>
    <description>&lt;P&gt;That was a example. You need to use your date column.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Nov 2024 12:05:18 GMT</pubDate>
    <dc:creator>shafiz_p</dc:creator>
    <dc:date>2024-11-21T12:05:18Z</dc:date>
    <item>
      <title>add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295173#M170475</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am trying to add a column that put PM whenever power bi finds that the date is the previous month just gone.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is PM = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Append'[Previous Month] = &lt;/SPAN&gt;&lt;SPAN&gt;PREVIOUSMONTH&lt;/SPAN&gt;&lt;SPAN&gt;(FinDate[Date]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"PM"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"NO"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I get no syntax errors, but when i run it I get this error:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The name 'IF' wasn't recognized. Make sure it's spelled correctly&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please can you help?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Nov 2024 11:27:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295173#M170475</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-21T11:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295191#M170476</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; Try below code to create a calculated column:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Is PM = 
IF (
    MONTH('Append'[Date]) = MONTH(TODAY()) - 1 &amp;amp;&amp;amp;
    YEAR('Append'[Date]) = YEAR(TODAY()),
    "PM",
    "NO"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!!&lt;/P&gt;&lt;P&gt;If this solved your problem, please accept it as a solution and a kudos!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Shahariar Hafiz&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 11:31:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295191#M170476</guid>
      <dc:creator>shafiz_p</dc:creator>
      <dc:date>2024-11-21T11:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295194#M170477</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;You are unable to find&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'Append'[Previous Month]&amp;nbsp;beacuse Append and&amp;nbsp;FinDate are two different tables which might not have relationship between them.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Alternatively if you wan create a column to decide Is PM you can try below code it calculates based on&amp;nbsp;'FinDate'[Date]&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IsPM = 
IF (
    'FinDate'[Date] &amp;gt;= EOMONTH(TODAY(), -2) + 1 &amp;amp;&amp;amp;
    'FinDate'[Date] &amp;lt;= EOMONTH(TODAY(), -1),
    "PM",
    "NO"
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 11:33:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295194#M170477</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2024-11-21T11:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295223#M170478</link>
      <description>&lt;P&gt;For some reason this didn't work. I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A single value for column 'Date' in table 'FinDate' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 11:50:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295223#M170478</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-21T11:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295231#M170480</link>
      <description>&lt;P&gt;Thank you. When I try to use your suggested code, I can't find the column (it doesn't show). Only measures are suggested.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 11:53:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295231#M170480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-21T11:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295250#M170481</link>
      <description>&lt;P&gt;That was a example. You need to use your date column.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 12:05:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295250#M170481</guid>
      <dc:creator>shafiz_p</dc:creator>
      <dc:date>2024-11-21T12:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295252#M170482</link>
      <description>&lt;P&gt;Sorry, I was creating a measure rather than a column. When I went to create a column it worked. THank you&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 12:06:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295252#M170482</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-21T12:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: add a column that puts PM whenever power bi finds that the date is the previous month just gone</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295276#M170485</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can also try like:&lt;/P&gt;
&lt;P&gt;Is PM =&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; EOMONTH('Append'[Date], 0) = EOMONTH(TODAY(), -1),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; "PM",&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; "NO"&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 12:15:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/add-a-column-that-puts-PM-whenever-power-bi-finds-that-the-date/m-p/4295276#M170485</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-11-21T12:15:02Z</dc:date>
    </item>
  </channel>
</rss>

