<?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 Measure with a value filter calculated previously in a virtual table (generated with slicer filter) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-a-value-filter-calculated-previously-in-a-virtual/m-p/2942432#M97232</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following data model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I need to create a measure that adds the sales from the FactSales table, but only when a store is "LFL"&lt;/STRONG&gt;, which is defined according to calculations to be carried out in the "FACT_LFL_STORE" table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-unicode-emoji" title=":police_car_light:"&gt;🚨&lt;/span&gt;&amp;nbsp; &lt;EM&gt;The &lt;U&gt;&lt;STRONG&gt;logic to know if a store is LFL or not LFL is the following&lt;/STRONG&gt;&lt;/U&gt;: For example, if in a slicer of my visualization I select 3 specific months, a store is considered LFL if for all those three selected months it has the value 1 in the "LFL_YN" column of the "FACT_LFL_STORE" table.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;If a store has any of the months selected in the display slicer with "LFL_YN"=0 in the "FACT_LFL_STORE" table, then that store should not be counted in the sum of sales, even if there are some of the months selected in the slicer that have the field "LFL_YN"=1.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, &lt;STRONG&gt;my problem is to get a measure that adds the sales when each store is considered as "LFL"&lt;/STRONG&gt; according to my criteria in the period selected in the visualization slicer that uses the "MONTH_ID" field of the "DIMCALENDAR" table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to build a virtual table that would summarize the "FACT_LFL_STORE" table, filtering those stores that according to the display slicer were "LFL", and then apply a filter to the sum of sales that would add only the sales of the stores that had in the previous virtual table, but I can't get it to work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would greatly appreciate if anyone knows how to fix this problem.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2022 18:20:52 GMT</pubDate>
    <dc:creator>JesusPenelas</dc:creator>
    <dc:date>2022-12-01T18:20:52Z</dc:date>
    <item>
      <title>Measure with a value filter calculated previously in a virtual table (generated with slicer filter)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-a-value-filter-calculated-previously-in-a-virtual/m-p/2942432#M97232</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following data model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I need to create a measure that adds the sales from the FactSales table, but only when a store is "LFL"&lt;/STRONG&gt;, which is defined according to calculations to be carried out in the "FACT_LFL_STORE" table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-unicode-emoji" title=":police_car_light:"&gt;🚨&lt;/span&gt;&amp;nbsp; &lt;EM&gt;The &lt;U&gt;&lt;STRONG&gt;logic to know if a store is LFL or not LFL is the following&lt;/STRONG&gt;&lt;/U&gt;: For example, if in a slicer of my visualization I select 3 specific months, a store is considered LFL if for all those three selected months it has the value 1 in the "LFL_YN" column of the "FACT_LFL_STORE" table.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;If a store has any of the months selected in the display slicer with "LFL_YN"=0 in the "FACT_LFL_STORE" table, then that store should not be counted in the sum of sales, even if there are some of the months selected in the slicer that have the field "LFL_YN"=1.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, &lt;STRONG&gt;my problem is to get a measure that adds the sales when each store is considered as "LFL"&lt;/STRONG&gt; according to my criteria in the period selected in the visualization slicer that uses the "MONTH_ID" field of the "DIMCALENDAR" table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to build a virtual table that would summarize the "FACT_LFL_STORE" table, filtering those stores that according to the display slicer were "LFL", and then apply a filter to the sum of sales that would add only the sales of the stores that had in the previous virtual table, but I can't get it to work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would greatly appreciate if anyone knows how to fix this problem.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 18:20:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-a-value-filter-calculated-previously-in-a-virtual/m-p/2942432#M97232</guid>
      <dc:creator>JesusPenelas</dc:creator>
      <dc:date>2022-12-01T18:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with a value filter calculated previously in a virtual table (generated with slicer filter)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-a-value-filter-calculated-previously-in-a-virtual/m-p/2943724#M97309</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="220885" data-lia-user-login="JesusPenelas" class="lia-mention lia-mention-user"&gt;JesusPenelas&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _select=SELECTCOLUMNS('DimCalendar',"MonthID",[Month_ID])
var _table=
FILTER('Fact_LFL_Store','Fact_LFL_Store'[Month_ID] in _select &amp;amp;&amp;amp; [LFL_YN]&amp;lt;&amp;gt;1)
var _column=SELECTCOLUMNS(_table,"Date",[STORE_ID])
return
IF(
   NOT( MAX('FactSales'[STORE_ID])) in _column &amp;amp;&amp;amp; MAX('FactSales'[Month_ID]) in _select,1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Sum_Measure =
SUMX(ALLSELECTED('FactSales'),[SALES])&lt;/LI-CODE&gt;
&lt;P&gt;2. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;Select 202208 202209 202210:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Select 202207 202208 202209:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&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>Fri, 02 Dec 2022 06:59:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-a-value-filter-calculated-previously-in-a-virtual/m-p/2943724#M97309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-02T06:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with a value filter calculated previously in a virtual table (generated with slicer filter)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-a-value-filter-calculated-previously-in-a-virtual/m-p/2944012#M97336</link>
      <description>&lt;P&gt;Thanks so much&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It's near from the result I need, but I Need use the "&lt;STRONG&gt;Flag&lt;/STRONG&gt;" measure as a filter inside the "&lt;STRONG&gt;Sum_Measure&lt;/STRONG&gt;".&lt;BR /&gt;&lt;BR /&gt;Thank you in advance for your help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":yellow_heart:"&gt;💛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 08:40:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-a-value-filter-calculated-previously-in-a-virtual/m-p/2944012#M97336</guid>
      <dc:creator>JesusPenelas</dc:creator>
      <dc:date>2022-12-02T08:40:36Z</dc:date>
    </item>
  </channel>
</rss>

