<?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: Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3408638#M128810</link>
    <description>&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1Xp7RkjP2MhBmXiASO1BDCxtotH74He75/view?usp=drivesdk" target="_self"&gt;Rolling.pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 10:40:28 GMT</pubDate>
    <dc:creator>rohanghule12</dc:creator>
    <dc:date>2023-08-31T10:40:28Z</dc:date>
    <item>
      <title>Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3398981#M128292</link>
      <description>&lt;P&gt;Need urgent help on DAX - Rolling 5 weeks from selected fiscal relative week and for last two years&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sales data which contains fiscal week, Fiscal week Relative, fiscal year, fiscal year relative,total sales...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one scliers which contains Fiscal week Relative. Data is for fiscal year (Feb to Feb).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose I have selected -10 as my relative week from sclier. Now I want to see total sales for last rolling 5 weeks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want to show this is in line chart for last 2 Years (2023 and 2022 in legend).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need to see week 13,12, 11,10 and 9 in x-axis and sales on Y axis.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Very important is I want 2 seperate lines on line chart for 2022 and 2023 with last rolling 5 weeks&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached image of data and output as example.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt; in attached image I have shown one line but I want seperate 2 lines and also shows 2 years in legend.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 11:14:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3398981#M128292</guid>
      <dc:creator>rohanghule12</dc:creator>
      <dc:date>2023-08-25T11:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3404734#M128651</link>
      <description>&lt;P&gt;To achieve this, you'll need to create a DAX measure that calculates the total sales for the last rolling 5 weeks based on the selected fiscal week relative. Then, you'll use this measure in your line chart to visualize the data for the last two years.&lt;/P&gt;
&lt;P&gt;Here's a step-by-step guide:&lt;/P&gt;
&lt;P&gt;1. Create a Measure for Total Sales for the Last Rolling 5 Weeks:&lt;/P&gt;
&lt;P&gt;Rolling 5 Weeks Sales = &lt;BR /&gt;VAR SelectedWeekRelative = SELECTEDVALUE('Table'[Fiscal Week Relative])&lt;BR /&gt;VAR MinWeek = SelectedWeekRelative - 4&lt;BR /&gt;VAR MaxWeek = SelectedWeekRelative&lt;/P&gt;
&lt;P&gt;RETURN&lt;BR /&gt;SUMX(&lt;BR /&gt;FILTER(&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Fiscal Week Relative] &amp;gt;= MinWeek &amp;amp;&amp;amp; 'Table'[Fiscal Week Relative] &amp;lt;= MaxWeek&lt;BR /&gt;),&lt;BR /&gt;'Table'[Total Sales]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;2. Create a Line Chart:&lt;/P&gt;
&lt;P&gt;- Drag the `Fiscal Week Number` to the X-axis.&lt;BR /&gt;- Drag the new `Rolling 5 Weeks Sales` measure to the Y-axis.&lt;BR /&gt;- Drag the `Fiscal Year` to the Legend.&lt;/P&gt;
&lt;P&gt;3. Filter the Chart:&lt;/P&gt;
&lt;P&gt;To ensure that the chart only shows the last 2 years, you can apply a visual-level filter:&lt;/P&gt;
&lt;P&gt;- Filter the `Fiscal Year` column to only include the last two years (2023 and 2022).&lt;/P&gt;
&lt;P&gt;4. Adjust the X-axis:&lt;/P&gt;
&lt;P&gt;To make sure the X-axis only shows the last rolling 5 weeks, you can adjust the X-axis settings:&lt;/P&gt;
&lt;P&gt;- Set the minimum value to `SelectedWeekRelative - 4` and the maximum value to `SelectedWeekRelative`.&lt;/P&gt;
&lt;P&gt;5. Finalize the Chart:&lt;/P&gt;
&lt;P&gt;- Adjust the title, labels, and other formatting options as needed.&lt;/P&gt;
&lt;P&gt;Once you've set up the chart, when you select a value from the slicer (e.g., -10), the chart should update to show the total sales for the last rolling 5 weeks for both 2022 and 2023.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The provided DAX code assumes that your table's name is 'Table'. Adjust the table name in the code if it's different.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 15:03:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3404734#M128651</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2023-08-29T15:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3405841#M128685</link>
      <description>&lt;P&gt;Hello Thank you for your response.&lt;/P&gt;&lt;P&gt;I am able to get last 4 weeks total on line chart, but it is showing only for one year.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In point 3 you have mentioned add year to filter in visual level.&lt;/LI&gt;&lt;LI&gt;I have tried but it is showing for one year.&lt;/LI&gt;&lt;LI&gt;I want to see two different lines for two different years.&lt;/LI&gt;&lt;LI&gt;Which should be dynamic based on fiscal week relative.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Please suggest how can I add fiscal year two lines so I can compare.&lt;/P&gt;&lt;P&gt;I have tried your solution and able to get weeks but not years.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 06:14:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3405841#M128685</guid>
      <dc:creator>rohanghule12</dc:creator>
      <dc:date>2023-08-30T06:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3405887#M128687</link>
      <description>&lt;P&gt;It will be helpful if you provide solution in pbix.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 06:30:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3405887#M128687</guid>
      <dc:creator>rohanghule12</dc:creator>
      <dc:date>2023-08-30T06:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3408619#M128809</link>
      <description>&lt;P&gt;I have implement your solution in pbix (please find attached pbix).&lt;/P&gt;&lt;P&gt;It is showing only for one week not for rolling 4 weeks and for rolling 2 years.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 10:29:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3408619#M128809</guid>
      <dc:creator>rohanghule12</dc:creator>
      <dc:date>2023-08-31T10:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3408638#M128810</link>
      <description>&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1Xp7RkjP2MhBmXiASO1BDCxtotH74He75/view?usp=drivesdk" target="_self"&gt;Rolling.pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 10:40:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3408638#M128810</guid>
      <dc:creator>rohanghule12</dc:creator>
      <dc:date>2023-08-31T10:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selected fiscal week relative, want to show rolling last 5 weeks data for rolling 2 years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3444601#M130985</link>
      <description>&lt;P&gt;I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.&lt;/P&gt;
&lt;P&gt;Your insights and updates will greatly assist others who might be encountering the same challenge.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 08:10:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Based-on-selected-fiscal-week-relative-want-to-show-rolling-last/m-p/3444601#M130985</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2023-09-24T08:10:33Z</dc:date>
    </item>
  </channel>
</rss>

