<?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 - Show the value of the last month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047973#M14228</link>
    <description>&lt;P&gt;Please inspect the attached file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
    <pubDate>Fri, 24 Apr 2020 23:22:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-24T23:22:21Z</dc:date>
    <item>
      <title>Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1046921#M14154</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem that I can't solve with dax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this widget to select years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&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;When I select 2019, I would like it to show me only the data of the range December 1 to December 31, 2019 and not the sum of all the months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While when I select the current year it shows me the end of the previous month. Example: We are in April, I would like you to show me the data from 1 March 2020 to 31 March 2020.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that contains the dates, and especially the End_Dates of each year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for the support!&lt;/P&gt;&lt;P&gt;Nicola&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 12:26:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1046921#M14154</guid>
      <dc:creator>NicolPuglia</dc:creator>
      <dc:date>2020-04-24T12:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1046952#M14159</link>
      <description>&lt;P&gt;Please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 12:38:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1046952#M14159</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-04-24T12:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1046983#M14163</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have not found the answer I was looking for.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 12:55:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1046983#M14163</guid>
      <dc:creator>NicolPuglia</dc:creator>
      <dc:date>2020-04-24T12:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047005#M14164</link>
      <description>&lt;P&gt;If possible please attacha demo dataset or original dataset so that we can work and solve your query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kaushlendra Mishra&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.powerbitalks.com" target="_blank"&gt;www.powerbitalks.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 13:11:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047005#M14164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-24T13:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047077#M14165</link>
      <description>&lt;LI-CODE lang="markup"&gt;// Assuming that you do have a proper
// Calendar in your model...

[Your Measure] =
var __currentlyVisibleYear = SELECTEDVALUE( Calendar[Year] )
var __TODAY = TODAY()
var __todaysYear = YEAR( __TODAY )
var __resultWhenBefore =
	var __period =	
		DATESINPERIOD(
			Calendar[Date],
			DATE( __currentlyVisibleYear, 12, 31 ),
			-1,
			month
		)
	var __result =
		CALCULATE(
			[Measure You Want To Display],
			__period
		)
	return
		__result
var __resultWhenIn =
	var __period = 
		CALCULATETABLE(
			PREVIOUSMONTH( Calendar[Date] ),
			Calendar[Date] = __TODAY
		)
	var __result =
		CALCULATE(
			[Measure You Want To Display],
			__period
		)
	return
		__result
var __result =
	switch( TRUE(),
		__currentlyVisibleYear &amp;lt; __todaysYear,
			__resultWhenBefore,
		__currentlyVisibleYear = __todaysYear,
			__resultWhenIn
	)
return
	__result
	&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 13:48:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047077#M14165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-24T13:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047151#M14169</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Years: My calendar&lt;/P&gt;&lt;P&gt;Value: Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Years:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;In 2020 I would like it to show the value from the beginning and end of the last month.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example: We are in April 2020, I would like the data to be seen from March 1 to March 31 in this case 15.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I select the year 2019, I would like it to show the data from 1 December to 31 December 2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By selecting in the widget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 14:15:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047151#M14169</guid>
      <dc:creator>NicolPuglia</dc:creator>
      <dc:date>2020-04-24T14:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047177#M14172</link>
      <description>I have written the measure above. It'll be working if you make sure that the Years table is a proper calendar/date table in the model. As it should be.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Fri, 24 Apr 2020 14:25:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047177#M14172</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-24T14:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047211#M14175</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot for the code, i'm compiling it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One question: where did you write '[Measure You Want To Display]', how can I fill it out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 14:37:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047211#M14175</guid>
      <dc:creator>NicolPuglia</dc:creator>
      <dc:date>2020-04-24T14:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047272#M14180</link>
      <description>This is a placeholder for your measure. Your base measure for which you want to do the time transformation/calculation.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Fri, 24 Apr 2020 14:59:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047272#M14180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-24T14:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047316#M14183</link>
      <description>&lt;P&gt;Hi, just that I'm really having trouble writing the time calculation in the CALCULATE. Based on those two tables or if you have an example how can I do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;really thank you very much&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 15:13:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047316#M14183</guid>
      <dc:creator>NicolPuglia</dc:creator>
      <dc:date>2020-04-24T15:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047973#M14228</link>
      <description>&lt;P&gt;Please inspect the attached file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 23:22:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1047973#M14228</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-24T23:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1049975#M14332</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i open the pbix , generate this error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error Message:&lt;BR /&gt;Object reference not set to an instance of an object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 07:25:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1049975#M14332</guid>
      <dc:creator>NicolPuglia</dc:creator>
      <dc:date>2020-04-27T07:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1050251#M14340</link>
      <description>Update your Power BI Desktop to the latest version.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Mon, 27 Apr 2020 08:47:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1050251#M14340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T08:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - Show the value of the last month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1051961#M14413</link>
      <description>&lt;P&gt;Very Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nicola!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 21:08:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Show-the-value-of-the-last-month/m-p/1051961#M14413</guid>
      <dc:creator>NicolPuglia</dc:creator>
      <dc:date>2020-04-27T21:08:00Z</dc:date>
    </item>
  </channel>
</rss>

