<?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: Subset table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2641347#M77559</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try something like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Euros only for grape 2021 measure: =
CALCULATE (
    SUM ( 'Sales'[Euros] ),
    FILTER ( ALL ( 'Sales' ), 'Sales'[Fruits] = "Grape" &amp;amp;&amp;amp; 'Sales'[Year] = 2021 )
)
&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 15 Jul 2022 12:26:31 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2022-07-15T12:26:31Z</dc:date>
    <item>
      <title>Subset table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2641302#M77557</link>
      <description>&lt;P&gt;I have a table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table: Sales&lt;/P&gt;&lt;P&gt;Fruits; Year; Euros&lt;/P&gt;&lt;P&gt;Apple; 2020; 5000&lt;/P&gt;&lt;P&gt;Apple; 2021; 6000&lt;/P&gt;&lt;P&gt;Grape;2020; 1000&lt;/P&gt;&lt;P&gt;Grape; 2021; 2000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I select the value of Euros for Grape in 2021?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a new measure which I would like to use part of the information from my table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should I use Selectvalues, values or filter?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 12:01:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2641302#M77557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-15T12:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Subset table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2641347#M77559</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try something like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Euros only for grape 2021 measure: =
CALCULATE (
    SUM ( 'Sales'[Euros] ),
    FILTER ( ALL ( 'Sales' ), 'Sales'[Fruits] = "Grape" &amp;amp;&amp;amp; 'Sales'[Year] = 2021 )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 15 Jul 2022 12:26:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2641347#M77559</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-07-15T12:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Subset table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2642880#M77672</link>
      <description>&lt;LI-CODE lang="csharp"&gt;[what you want] =
calculate(
  selectedvalue( Sales[Euros] ),

  // keepfilters is here to honor
  // any already existing filters
  // on the table
  keepfilters( Sales[Fruit] = "Grape" ),
  keepfilters( Sales[Year] = 2021 ),

  // use all( Sales ) if you want to
  // remove all exising filters on Sales;
  // if you want to keep them, then remove
  // this line
  all( Sales )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 17 Jul 2022 08:46:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2642880#M77672</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-07-17T08:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Subset table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2644342#M77770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try to create a measure like below and you can choose to use filter function or not :&lt;/P&gt;&lt;P&gt;Measure with filter function:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure1 =
CALCULATE (
    MAX ( Sales[Euros] ),
    FILTER ( ALL ( Sales ), Sales[Fruits] = "Grape" &amp;amp;&amp;amp; Sales[Year] = 2021 )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Measure without filter function:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure2 =
CALCULATE (
    MAX ( Sales[Euros] ),
    Sales[Fruits] = "Grape",
    Sales[Year] = 2021,
    ALL ( Sales )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If I misunderstand your demands, please feel free to let me know.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Binbin Yu&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 09:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subset-table/m-p/2644342#M77770</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-18T09:11:04Z</dc:date>
    </item>
  </channel>
</rss>

