<?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: Last Week Turnover Filter Help Needed please in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Week-Turnover-Filter-Help-Needed-please/m-p/3156944#M113254</link>
    <description>&lt;P&gt;Huge Kudos rautaniket0077&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; owe you a coffee &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Microsoft Excel, I had to tweak the DAX as SELECTEDVALUE only works in Power BI desktop. Solution:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=CALCULATE(SUM(ASC_TBI_TBL[Turnover]),&lt;BR /&gt;'Qry_Accounting Periods'[_Week] = IF(HASONEVALUE(ASC_TBI_TBL[Week Number]),VALUES(ASC_TBI_TBL[Week Number])-1))&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 19:29:20 GMT</pubDate>
    <dc:creator>Pablos_007</dc:creator>
    <dc:date>2023-03-27T19:29:20Z</dc:date>
    <item>
      <title>Last Week Turnover Filter Help Needed please</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Week-Turnover-Filter-Help-Needed-please/m-p/3154591#M113109</link>
      <description>&lt;P&gt;Trying to use DAX in Microsoft Excel - Help sought please &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a measure named [Total Turnover 2023]&amp;nbsp;&lt;/P&gt;&lt;P&gt;(=CALCULATE(SUM(ASC_TBI_TBL[Turnover]),ALL(ASC_TBI_TBL[FY]),ASC_TBI_TBL[FY]="2023")&lt;/P&gt;&lt;P&gt;Fact table is &lt;STRONG&gt;ASC_TBI_TBL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In my fact table, I created a column named Customer_Product&lt;/P&gt;&lt;P&gt;Date Table is &lt;STRONG&gt;Qry_Accounting Periods&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My date table goes from 01/01/2023 to 31/12/2023 with a column named _Week that has entries from 1 to 52.&lt;/P&gt;&lt;P&gt;In my date table, I created two columns in PowerQuery a StartOfWeek Date and EndOfWeek Date&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to attain the previous week Turnover on the column Customer_Product. If slicer pick week 7 measure gives week 6 Turnover. If week 11, get week 10 Turnover etc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My effort:-&lt;/P&gt;&lt;P&gt;LW_Turnover_2023=CALCULATE([Total Turnover 2023],FILTER(ALLSELECTED('Qry_Accounting Periods'),'Qry_Accounting Periods'[_Week]=MIN('Qry_Accounting Periods'[_Week])-1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works if I view _Week as row and add two measures, [Total Turnover 2023] and [LW_Turnover_2023]&lt;/P&gt;&lt;P&gt;However, if i add Customer_Product it doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Somehow I need to Filter on ASC_TBI_TBL Table on column ASC_TBI_TBL[Customer_Product]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So close but so far &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 19:06:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Week-Turnover-Filter-Help-Needed-please/m-p/3154591#M113109</guid>
      <dc:creator>Pablos_007</dc:creator>
      <dc:date>2023-03-26T19:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Last Week Turnover Filter Help Needed please</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Week-Turnover-Filter-Help-Needed-please/m-p/3155519#M113178</link>
      <description>&lt;P&gt;Try using below measure&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;LW_Turnover_2023 =&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;('Qry_Accounting Periods'[_Week])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (SUM(ASC_TBI_TBL[Turnover])&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Qry_Accounting Periods'[_Week]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;= &lt;/SPAN&gt;&lt;SPAN&gt;a-1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;&lt;SPAN&gt;b&lt;BR /&gt;&lt;BR /&gt;use one slicer for week and another for year (2023)&lt;BR /&gt;&lt;BR /&gt;as you can see in the below screenshot i have selected year = 2015 and week = 8.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;dont use this below measure&lt;BR /&gt;(=CALCULATE(SUM(ASC_TBI_TBL[Turnover]),ALL(ASC_TBI_TBL[FY]),ASC_TBI_TBL[FY]="2023")&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if it solves your issue please accept my answer as solution.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Mar 2023 08:45:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Week-Turnover-Filter-Help-Needed-please/m-p/3155519#M113178</guid>
      <dc:creator>rautaniket0077</dc:creator>
      <dc:date>2023-03-27T08:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Last Week Turnover Filter Help Needed please</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Week-Turnover-Filter-Help-Needed-please/m-p/3156944#M113254</link>
      <description>&lt;P&gt;Huge Kudos rautaniket0077&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; owe you a coffee &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Microsoft Excel, I had to tweak the DAX as SELECTEDVALUE only works in Power BI desktop. Solution:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=CALCULATE(SUM(ASC_TBI_TBL[Turnover]),&lt;BR /&gt;'Qry_Accounting Periods'[_Week] = IF(HASONEVALUE(ASC_TBI_TBL[Week Number]),VALUES(ASC_TBI_TBL[Week Number])-1))&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 19:29:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Week-Turnover-Filter-Help-Needed-please/m-p/3156944#M113254</guid>
      <dc:creator>Pablos_007</dc:creator>
      <dc:date>2023-03-27T19:29:20Z</dc:date>
    </item>
  </channel>
</rss>

