<?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: Create a virtual table based on date and other slicer selection in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467491#M67073</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just creat a measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amount = SUM ( Tansactions[Sales] )&lt;/P&gt;&lt;P&gt;insert a matrix visual, placr Customers in the rows and the Amount measure in the values&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 20:44:47 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-04-20T20:44:47Z</dc:date>
    <item>
      <title>Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467357#M67059</link>
      <description>&lt;P&gt;I need to create a virtual table which will be a subset of fact table based on slicer selection and calendar date selection. Please help.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 19:02:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467357#M67059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-20T19:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467405#M67066</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ready to support you. Please explain the issue in details and provide sample data and screenshots&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 19:33:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467405#M67066</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-20T19:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467465#M67070</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;. Let me explain the scenario here. I have this transaction table here.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a slicer to select the date range. I have slicers to selection product, brand etc. Based on date range frpm slicer and prod + brand selection as option, I have to create a virtual table which will be a subset of the transaction table. It will take only those records that fall under selected date range from slicer additionaly if there is any slicer selection done on prod/brand.&lt;/P&gt;&lt;P&gt;Example - If I select only date range slicer for customers between 1-Aug-2022 to 20-Sep-2022. And no selection of prod, brand. Then my output should show aggregated sales for the customer within that date range&lt;/P&gt;&lt;P&gt;In this case, this should be my output&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scenario 2 - Suppose&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select only date range slicer for customers between 1-Aug-2022 to 20-Sep-2022. And Brand 2 is selected. Then my output should show aggregated sales for the customer within that date range and only customer sales with brand 2.&amp;nbsp;In this case, this should be my output. Please help.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 20:20:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467465#M67070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-20T20:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467491#M67073</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just creat a measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amount = SUM ( Tansactions[Sales] )&lt;/P&gt;&lt;P&gt;insert a matrix visual, placr Customers in the rows and the Amount measure in the values&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 20:44:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467491#M67073</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-20T20:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467720#M67082</link>
      <description>&lt;P&gt;No this will not help. Dynamically select the date from slicer and get the subset of transaction table.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 02:40:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467720#M67082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-21T02:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467782#M67083</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;this is exactly what Powe Bi does. Why do you think you won't get the required result? Am I missing something?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 03:02:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2467782#M67083</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-21T03:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2468610#M67137</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please tell me how to add here date filters. It is not working.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZECOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Transaction[Customer]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar Date'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;gt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;startDate&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;lt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;endDate&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Sales"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Transaction[SALES]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Pallavi&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Apr 2022 10:01:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2468610#M67137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-21T10:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2468623#M67138</link>
      <description>&lt;P&gt;What are StartDate and EndDate?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 10:07:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2468623#M67138</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-21T10:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2468631#M67139</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;startDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;STARTOFQUARTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;endDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;ENDOFMONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Apr 2022 10:09:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2468631#M67139</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-21T10:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2469187#M67179</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry just noticed your reply. You may try this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Table1 =
var startDate = 
    STARTOFQUARTER('Calendar Date'[Date] )
var endDate = 
    ENDOFMONTH('Calendar Date'[Date])
RETURN
FILTER (
    SUMMARIZE (
        Transaction,
        Transaction[Customer],
        'Calendar Date'[Date],
        "Sales", SUM ( Transaction[SALES] )
    ),
    'Calendar Date'[Date] &amp;gt;= startDate
        &amp;amp;&amp;amp; 'Calendar Date'[Date] &amp;lt;= endDate
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 13:49:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2469187#M67179</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-21T13:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create a virtual table based on date and other slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2474380#M67507</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 =
CALENDAR(MIN('Table'[Transcation Date]),MAX('Table'[Transcation Date]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales-Measure =
var _selectmin=MINX(ALLSELECTED('Table 2'),'Table 2'[Date])
var _seletmax=MaxX(ALLSELECTED('Table 2'),'Table 2'[Date])
var _selectpro=SELECTEDVALUE('Table'[Product])
var _selectbrand=SELECTEDVALUE('Table'[Brand])
return
SWITCH(
    TRUE(),
NOT( ISFILTERED('Table'[Product]))&amp;amp;&amp;amp;NOT( ISFILTERED('Table'[Brand])),CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[Transcation Date]&amp;gt;=_selectmin&amp;amp;&amp;amp;'Table'[Transcation Date]&amp;lt;=_seletmax&amp;amp;&amp;amp;'Table'[Customer]=MAX('Table'[Customer]))),
NOT( ISFILTERED('Table'[Product])),CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[Transcation Date]&amp;gt;=_selectmin&amp;amp;&amp;amp;'Table'[Transcation Date]&amp;lt;=_seletmax&amp;amp;&amp;amp;'Table'[Brand]=_selectbrand&amp;amp;&amp;amp;'Table'[Customer]=MAX('Table'[Customer]))),
NOT( ISFILTERED('Table'[Brand])),CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[Transcation Date]&amp;gt;=_selectmin&amp;amp;&amp;amp;'Table'[Transcation Date]&amp;lt;=_seletmax&amp;amp;&amp;amp;'Table'[Product]=_selectpro&amp;amp;&amp;amp;'Table'[Customer]=MAX('Table'[Customer]))),
CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[Transcation Date]&amp;gt;=_selectmin&amp;amp;&amp;amp;'Table'[Transcation Date]&amp;lt;=_seletmax&amp;amp;&amp;amp;'Table'[Product]=_selectpro&amp;amp;&amp;amp;'Table'[Brand]=_selectbrand&amp;amp;&amp;amp;'Table'[Customer]=MAX('Table'[Customer]))))&lt;/LI-CODE&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;Scenario 1：&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Scenario 2：&lt;/P&gt;
&lt;P&gt;&lt;img /&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, 25 Apr 2022 08:51:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-virtual-table-based-on-date-and-other-slicer-selection/m-p/2474380#M67507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-25T08:51:40Z</dc:date>
    </item>
  </channel>
</rss>

