<?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 Can you accomplish this in PowerBI: in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-you-accomplish-this-in-PowerBI/m-p/1714976#M35425</link>
    <description>&lt;P&gt;I'm not certain this is even possible, or within the realms of PowerBI; but I know this is the right place to ask!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a stock movements table that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;It has various types of stock movements from Stocktakes, through to Deliveries and Sales, Etc.....&amp;nbsp; &amp;nbsp;Every Stock Movement creates a stock line, and the running total is written to the line at that time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our users would like to select a specific Date / Time, and have the system return the total value of stock on hand based on their input.&amp;nbsp; I have deduced that the following logic would give the correct result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A User to define Date on which they would like the Total Stock on Hand results returned&lt;/LI&gt;&lt;LI&gt;Set the User Defined Date as the "End Date"&lt;/LI&gt;&lt;LI&gt;Using a given input date, return the closest Stocktake date prior to the date&lt;/LI&gt;&lt;LI&gt;Set the closest stocktake date prior to that date as the "Start Date"&lt;/LI&gt;&lt;LI&gt;Return a sumarised Table showing the most recent Movement Records for each distinct Item Between the User Defined Date (End Date), and the Stocktake Date&amp;nbsp; (Start Date)&lt;/LI&gt;&lt;LI&gt;Result to deliver a table including Item, Running Totals &amp;amp; Value.&lt;/LI&gt;&lt;/OL&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Based on the above, and a user input parameter of: 09/03/2021 22:00; I would expect the resultant table to look like this::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm fairly new to PowerBI, so have a few questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can PowerBI accomplish this?&amp;nbsp; (Returning / Filtering a Table from a user input Paramter)&lt;/LI&gt;&lt;LI&gt;How would you do this in the PowerBI UX?&lt;/LI&gt;&lt;LI&gt;Is this a DAX or a M Query type question?&lt;/LI&gt;&lt;LI&gt;Any hints as to how I might accomplish this would be greatly welcomed!!!&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Robbie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Mar 2021 00:13:16 GMT</pubDate>
    <dc:creator>Robbief</dc:creator>
    <dc:date>2021-03-11T00:13:16Z</dc:date>
    <item>
      <title>Can you accomplish this in PowerBI:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-you-accomplish-this-in-PowerBI/m-p/1714976#M35425</link>
      <description>&lt;P&gt;I'm not certain this is even possible, or within the realms of PowerBI; but I know this is the right place to ask!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a stock movements table that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;It has various types of stock movements from Stocktakes, through to Deliveries and Sales, Etc.....&amp;nbsp; &amp;nbsp;Every Stock Movement creates a stock line, and the running total is written to the line at that time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our users would like to select a specific Date / Time, and have the system return the total value of stock on hand based on their input.&amp;nbsp; I have deduced that the following logic would give the correct result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A User to define Date on which they would like the Total Stock on Hand results returned&lt;/LI&gt;&lt;LI&gt;Set the User Defined Date as the "End Date"&lt;/LI&gt;&lt;LI&gt;Using a given input date, return the closest Stocktake date prior to the date&lt;/LI&gt;&lt;LI&gt;Set the closest stocktake date prior to that date as the "Start Date"&lt;/LI&gt;&lt;LI&gt;Return a sumarised Table showing the most recent Movement Records for each distinct Item Between the User Defined Date (End Date), and the Stocktake Date&amp;nbsp; (Start Date)&lt;/LI&gt;&lt;LI&gt;Result to deliver a table including Item, Running Totals &amp;amp; Value.&lt;/LI&gt;&lt;/OL&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Based on the above, and a user input parameter of: 09/03/2021 22:00; I would expect the resultant table to look like this::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm fairly new to PowerBI, so have a few questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can PowerBI accomplish this?&amp;nbsp; (Returning / Filtering a Table from a user input Paramter)&lt;/LI&gt;&lt;LI&gt;How would you do this in the PowerBI UX?&lt;/LI&gt;&lt;LI&gt;Is this a DAX or a M Query type question?&lt;/LI&gt;&lt;LI&gt;Any hints as to how I might accomplish this would be greatly welcomed!!!&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Robbie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 00:13:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-you-accomplish-this-in-PowerBI/m-p/1714976#M35425</guid>
      <dc:creator>Robbief</dc:creator>
      <dc:date>2021-03-11T00:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can you accomplish this in PowerBI:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-you-accomplish-this-in-PowerBI/m-p/1715380#M35436</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="917" data-lia-user-login="Robbief" class="lia-mention lia-mention-user"&gt;Robbief&lt;/a&gt; , Create measure like below example , for running total, value , movement type. If needed, then for date too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use an independent data table , if possible for filter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;running total = &lt;BR /&gt;var __MAX = maxx(allselected(Date), Date[Date])&lt;BR /&gt;VAR __id = MAX ('Table'[ITEM] )&lt;BR /&gt;VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[ITEM] = __id,'Table'[Date] &amp;lt;= __MAX ) &lt;BR /&gt;CALCULATE ( Sum ('Table'[running total] ), VALUES ('Table'[ITEM] ),'Table'[ITEM] = __id,'Table'[Date] = __date,'Table'[Date] &amp;lt;= __MAX )&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 05:31:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-you-accomplish-this-in-PowerBI/m-p/1715380#M35436</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-03-11T05:31:50Z</dc:date>
    </item>
  </channel>
</rss>

