<?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: Shares price match with previous price in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093218#M162435</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="711831" data-lia-user-login="MAP" class="lia-mention lia-mention-user"&gt;MAP&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Are there any business rules that defines how close the approximate value should be ? For example if price was 80 so would that be considered close to 120 ?&lt;/P&gt;</description>
    <pubDate>Sat, 10 Aug 2024 13:55:57 GMT</pubDate>
    <dc:creator>SachinNandanwar</dc:creator>
    <dc:date>2024-08-10T13:55:57Z</dc:date>
    <item>
      <title>Shares price match with previous price</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093095#M162430</link>
      <description>&lt;P&gt;I am currently working on stock market data in Power BI and need to create a DAX measure that identifies when a stock’s price approximately matches a given value on previous days. For example, if the price of XYZ shares is 120, I want to find out when the price of XYZ shares was approximately 120 on previous days.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 10:16:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093095#M162430</guid>
      <dc:creator>MAP</dc:creator>
      <dc:date>2024-08-10T10:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Shares price match with previous price</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093218#M162435</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="711831" data-lia-user-login="MAP" class="lia-mention lia-mention-user"&gt;MAP&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Are there any business rules that defines how close the approximate value should be ? For example if price was 80 so would that be considered close to 120 ?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 13:55:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093218#M162435</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-08-10T13:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Shares price match with previous price</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093336#M162437</link>
      <description>&lt;P&gt;Since I dont have your sample data and your idea of approximate price, I have implemented my idea here.&lt;BR /&gt;I have taken all the historical data of tata motors from Yahoo finance.&lt;BR /&gt;&lt;BR /&gt;Source Data&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;First the closing price is rounded off&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now latest price is found&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Starting digit of latest price is found&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Number of digits in the latest price is found&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Nearest Lowest round figure is found&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Nearest highest round figure is found&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Required date indicators is found&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Filtered the "Price Indicator" text in the final column&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I hope you have your answer. If my answer is satisfying with your criteria then please accept the same as your solution.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 16:48:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093336#M162437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-10T16:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Shares price match with previous price</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093595#M162445</link>
      <description>&lt;P&gt;If price is 120 then 120.01 to 120.99 will be consider close&lt;/P&gt;</description>
      <pubDate>Sun, 11 Aug 2024 06:03:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093595#M162445</guid>
      <dc:creator>MAP</dc:creator>
      <dc:date>2024-08-11T06:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Shares price match with previous price</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093611#M162446</link>
      <description>&lt;P&gt;Thank you for replying. I'll see if your answer fulfills what I want.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Aug 2024 06:11:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4093611#M162446</guid>
      <dc:creator>MAP</dc:creator>
      <dc:date>2024-08-11T06:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Shares price match with previous price</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4094789#M162501</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Thanks for the reply from Rakesh1705 and&amp;nbsp;SachinNandanwar&amp;nbsp;&amp;nbsp;, please allow me to provide another insight:&lt;/P&gt;
&lt;P style="margin: 0in; font-size: 12.0pt;"&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="711831" data-lia-user-login="MAP" class="lia-mention lia-mention-user"&gt;MAP&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you tell me if your problem is solved? If yes, please accept &lt;/SPAN&gt;&lt;SPAN&gt;their&lt;/SPAN&gt;&lt;SPAN&gt; as solution.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Regarding the issue you raised, my solution is as follows:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;1.First I have created the following table and the column names and data are the data you have given:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;2.&lt;/SPAN&gt;&lt;SPAN&gt;First, you can try using the following calculation table, using its id column as a slicer:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = SELECTCOLUMNS('Table','Table'[ID],'Table'[date])
&lt;/LI-CODE&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;3.&lt;/SPAN&gt;&lt;SPAN&gt;Second, use the following measures and modify the filters:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR nday =
    MAX ( 'Table 2'[Table_date] )
VAR nprice =
    MAXX (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[date] = nday ),
        'Table'[price]
    )
VAR selce11 =
    MAX ( 'Table 2'[Table_ID] )
RETURN
    IF (
        ISFILTERED ( 'Table 2'[Table_ID] ),
        IF (
            ABS ( MAX ( 'Table'[price] ) - nprice ) &amp;lt; 1
                &amp;amp;&amp;amp; MAX ( 'Table'[ID] ) = selce11,
            1,
            0
        ),
        1
    )&lt;/LI-CODE&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;4.Here's my final result, which I hope meets your requirements.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&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 style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Please find the attached pbix relevant to the case.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Of course, if you have any new ideas, you are welcome to contact us.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post &lt;SPAN&gt;helps&lt;/SPAN&gt;, then please consider Accept it &lt;SPAN&gt;as the solution &lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 07:53:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Shares-price-match-with-previous-price/m-p/4094789#M162501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-12T07:53:46Z</dc:date>
    </item>
  </channel>
</rss>

