<?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: Create calendar column value based on a criteria in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calendar-column-value-based-on-a-criteria/m-p/1959610#M42815</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;BeforeActualYearMonth =
var CalendarYearMonth = Calendar[YearMonth]
// There must be just one value in LoadedAt
var LoadedAtYearMonth = SELECTEDVALUE( LoadedAt[YearMonth] )
return
	if ( CalendarYearMonth &amp;lt; LoadedAtYearMonth,
		"BeforeActual",
		// CalendarYearMonth must be turned into
		// a string since you can't mix types
		// in a column. If it's already text,
		// you can just use the raw value without &amp;gt;&amp;amp; ""&amp;lt;.
		CalendarYearMonth &amp;amp; ""
	)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 10:18:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-15T10:18:16Z</dc:date>
    <item>
      <title>Create calendar column value based on a criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calendar-column-value-based-on-a-criteria/m-p/1959335#M42803</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I would like to ask your help to create a calendar column (BeforeActualYearMonth) based on the following criteria:&lt;/P&gt;&lt;P&gt;If the&amp;nbsp; Calendar[YearMonth] &amp;lt; LoadedAt[YearMonth] then Calendar[BeforeActualYearMonth] = "BeforeActual" else Calendar[BeforeActualYearMonth] = Calendar[YearMonth]&amp;nbsp; in each row in Calendar table.&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;Please, see the attached file for more details:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Power BI Running Total" href="https://1drv.ms/u/s!As5PJ-AOAlbIhOxEYV4lW8gnaUMVFA?e=rJbyd9" target="_self"&gt;Power BI Running Total&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: It is neccessary to calculate start balance of all material quanity in running total calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 08:37:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calendar-column-value-based-on-a-criteria/m-p/1959335#M42803</guid>
      <dc:creator>EnderWiggin</dc:creator>
      <dc:date>2021-07-15T08:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create calendar column value based on a criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calendar-column-value-based-on-a-criteria/m-p/1959610#M42815</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;BeforeActualYearMonth =
var CalendarYearMonth = Calendar[YearMonth]
// There must be just one value in LoadedAt
var LoadedAtYearMonth = SELECTEDVALUE( LoadedAt[YearMonth] )
return
	if ( CalendarYearMonth &amp;lt; LoadedAtYearMonth,
		"BeforeActual",
		// CalendarYearMonth must be turned into
		// a string since you can't mix types
		// in a column. If it's already text,
		// you can just use the raw value without &amp;gt;&amp;amp; ""&amp;lt;.
		CalendarYearMonth &amp;amp; ""
	)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 10:18:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calendar-column-value-based-on-a-criteria/m-p/1959610#M42815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-15T10:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create calendar column value based on a criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calendar-column-value-based-on-a-criteria/m-p/1959620#M42816</link>
      <description>&lt;P&gt;This is what I want, thank you&amp;nbsp;Anonymous&lt;/LI-USER&gt;!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 10:20:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calendar-column-value-based-on-a-criteria/m-p/1959620#M42816</guid>
      <dc:creator>EnderWiggin</dc:creator>
      <dc:date>2021-07-15T10:20:14Z</dc:date>
    </item>
  </channel>
</rss>

