<?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: Sales for auto select current month in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/825809#M5792</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added a Card from the Visualization. When I am adding this rule in the measure, it is not taking the variable name as only VAR and it is showing the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is expecting the variable name should be either VAR.P, VAR.S, VARX.P or VARX.S as you can see in the below screenshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/76de19b8d4914a2f01ed13c42b3fd84088bf0b73/68747470733a2f2f7777772e656e6a6f797368617265706f696e742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031392f31302f31312e706e67" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, After adding the rule as you sent, this below error is appearing. Here, the &lt;STRONG&gt;Current Month&lt;/STRONG&gt;&amp;nbsp;represents another measure that I have used to get the current month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/3186b229bed908c6697dfca982e1b47c9e4667bf/68747470733a2f2f7777772e656e6a6f797368617265706f696e742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031392f31302f3131312e706e67" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, can you suggest me if anything else I have to do?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2019 06:46:10 GMT</pubDate>
    <dc:creator>PreetiSahu321</dc:creator>
    <dc:date>2019-10-23T06:46:10Z</dc:date>
    <item>
      <title>Sales for auto select current month in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/824308#M5730</link>
      <description>&lt;P&gt;Hello Power BI Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recently, I was working with Power BI with DAX. As per my requirement, I have an &lt;STRONG&gt;Orders&lt;/STRONG&gt; list and this list is having some columns like Net value, Net price, etc where the Data type is the &lt;STRONG&gt;Whole number&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here, I want to see the total net value as per the current month which will be auto-selected. Let's take an example to make it clear.&lt;/P&gt;&lt;P&gt;As per my requirement, I want to see the total net value of this current month (from 1st to 31st Oct). Similarly, it will show me the total net value of next month by auto-selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this purpose, I have created 2 measures as:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;To get the current month:&lt;BR /&gt;Current Month = max('Calendar'[year_month])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. To get the total net value for the current month:&lt;/P&gt;&lt;P&gt;sales for current month = VAR Current_Month = [Current Month] RETURN CALCULATE (SUM (Orders[Net value]), FILTER (ALL ( 'Calendar'[year_month] ), 'Calendar'[year_month] = Current_Month ), Orders[Name1]="Orders")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating these two measures, when I am adding a &lt;STRONG&gt;Gauge&lt;/STRONG&gt; chart from the &lt;STRONG&gt;Visualization&lt;/STRONG&gt;, then I can not see my total net value for the current month. The chart is appearing like the below screenshot:&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;Can anyone suggest to me that what I can do anything else if my DAX is correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 07:23:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/824308#M5730</guid>
      <dc:creator>PreetiSahu321</dc:creator>
      <dc:date>2019-10-22T07:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for auto select current month in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/825582#M5784</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="180203" data-lia-user-login="PreetiSahu321" class="lia-mention lia-mention-user"&gt;PreetiSahu321&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What you can do for testing is to put your measure on a card. That will tell you if it the measure, or the visual.&lt;BR /&gt;This may also have to do with the relationship.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Sales for current month =
VAR = [Current Month]
VAR _Calc =

    CALCULATE (
        SUM ( Orders[Net value] ),
        FILTER (
            ALL ( 'Calendar'[year_month] ),
            'Calendar'[year_month] = Current_Month
        ),
        Orders[Name1] = "Orders"
    )
return  _Calc&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 00:52:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/825582#M5784</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-23T00:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for auto select current month in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/825809#M5792</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added a Card from the Visualization. When I am adding this rule in the measure, it is not taking the variable name as only VAR and it is showing the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is expecting the variable name should be either VAR.P, VAR.S, VARX.P or VARX.S as you can see in the below screenshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/76de19b8d4914a2f01ed13c42b3fd84088bf0b73/68747470733a2f2f7777772e656e6a6f797368617265706f696e742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031392f31302f31312e706e67" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, After adding the rule as you sent, this below error is appearing. Here, the &lt;STRONG&gt;Current Month&lt;/STRONG&gt;&amp;nbsp;represents another measure that I have used to get the current month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/3186b229bed908c6697dfca982e1b47c9e4667bf/68747470733a2f2f7777772e656e6a6f797368617265706f696e742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031392f31302f3131312e706e67" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, can you suggest me if anything else I have to do?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 06:46:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/825809#M5792</guid>
      <dc:creator>PreetiSahu321</dc:creator>
      <dc:date>2019-10-23T06:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for auto select current month in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/826380#M5812</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="180203" data-lia-user-login="PreetiSahu321" class="lia-mention lia-mention-user"&gt;PreetiSahu321&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry, have to give a name with Var. Try var _curMonth = [Current Month]&lt;/P&gt;&lt;P&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 14:33:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/826380#M5812</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-23T14:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for auto select current month in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/827028#M5829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added the Variable name. Now no error is coming, but still the total Net value is not appearing in the Card as you can see in the below screenshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/d4b217db59a0f785e8b24342b7c0912d6fe6a9bf/68747470733a2f2f7777772e656e6a6f797368617265706f696e742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031392f31302f313131312e706e67" border="0" /&gt;&lt;/P&gt;&lt;P&gt;Please, can you suggest me anything else if you have any idea?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 07:03:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-auto-select-current-month-in-Power-BI/m-p/827028#M5829</guid>
      <dc:creator>PreetiSahu321</dc:creator>
      <dc:date>2019-10-24T07:03:44Z</dc:date>
    </item>
  </channel>
</rss>

