<?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 DAX - between the period of the month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-between-the-period-of-the-month/m-p/2609346#M75635</link>
    <description>&lt;P&gt;I need to automate this measurement to show the value BETWEEN THE PERIOD OF THE MONTH of each column period:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ROE = (DIVIDE([Lucro Líquido], [Patrimonio Liquido],0) / 1000)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2022 12:04:59 GMT</pubDate>
    <dc:creator>Diego_Vialle</dc:creator>
    <dc:date>2022-06-29T12:04:59Z</dc:date>
    <item>
      <title>DAX - between the period of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-between-the-period-of-the-month/m-p/2609346#M75635</link>
      <description>&lt;P&gt;I need to automate this measurement to show the value BETWEEN THE PERIOD OF THE MONTH of each column period:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ROE = (DIVIDE([Lucro Líquido], [Patrimonio Liquido],0) / 1000)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 12:04:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-between-the-period-of-the-month/m-p/2609346#M75635</guid>
      <dc:creator>Diego_Vialle</dc:creator>
      <dc:date>2022-06-29T12:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - between the period of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-between-the-period-of-the-month/m-p/2609852#M75660</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356338" data-lia-user-login="Diego_Vialle" class="lia-mention lia-mention-user"&gt;Diego_Vialle&lt;/a&gt; , Not very clear. If you want to save on this month, last month etc. You can have a column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Month Type = Switch( True(),&lt;BR /&gt;eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,&lt;BR /&gt;eomonth([Date],0)= eomonth(Today(),0),"This Month" ,&lt;BR /&gt;Format([Date],"MMM-YYYY")&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 15:11:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-between-the-period-of-the-month/m-p/2609852#M75660</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-29T15:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - between the period of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-between-the-period-of-the-month/m-p/2617417#M76113</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356338" data-lia-user-login="Diego_Vialle" class="lia-mention lia-mention-user"&gt;Diego_Vialle&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Use Enter data to create a table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;month =
FORMAT('Table'[Date],"mmm")&amp;amp;"/"&amp;amp;YEAR('Table'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;3. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
var _1=
CALCULATE(SUM('Table'[Patrimonio Liquido]),FILTER(ALL('Table'),
'Table'[month]=MAX('Table'[month])))
var _2=
CALCULATE(SUM('Table'[Lucro Líquido]),FILTER(ALL('Table'),
'Table'[month]=MAX('Table'[month])))
return
DIVIDE(_1,_2)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 =
var _1=
CALCULATE(SUM('Table'[Patrimonio Liquido]),FILTER(ALL('Table'),
'Table'[month]=MAX('Table'[month])))
var _2=
CALCULATE(SUM('Table'[Amount1]),FILTER(ALL('Table'),
'Table'[month]=MAX('Table'[month])))
return
DIVIDE(_1,_2)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 3 =
SWITCH(
    TRUE(),
    MAX('Table2'[Group])="Margem Liquida",[Measure],
    MAX('Table2'[Group])="ROE",[Measure 2])&lt;/LI-CODE&gt;
&lt;P&gt;4. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If you need pbix, please click &lt;A href="https://community.fabric.microsoft.com/t5/DAX%20-%20between%20the%20period%20of%20the%20month.pbix" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 12:12:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-between-the-period-of-the-month/m-p/2617417#M76113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-04T12:12:34Z</dc:date>
    </item>
  </channel>
</rss>

