<?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: Making an index for prices in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Making-an-index-for-prices/m-p/2564336#M73023</link>
    <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2022 14:44:10 GMT</pubDate>
    <dc:creator>ase</dc:creator>
    <dc:date>2022-06-07T14:44:10Z</dc:date>
    <item>
      <title>Making an index for prices</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Making-an-index-for-prices/m-p/2559123#M72758</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fairly new to PowerBI and I have a slight issue with creating a dax measure, which takes the price of a product in the beginning of the period as 100 (Base) and then based on the movements of the price over time gives me the percentage increase/decrease in price.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a simplification of the data to ilustrate the issue.&amp;nbsp;&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;Could someone please help me out with the creation of the measure?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 23:55:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Making-an-index-for-prices/m-p/2559123#M72758</guid>
      <dc:creator>ase</dc:creator>
      <dc:date>2022-06-04T23:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Making an index for prices</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Making-an-index-for-prices/m-p/2559277#M72761</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397538" data-lia-user-login="ase" class="lia-mention lia-mention-user"&gt;ase&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to thr sample file with the solution&amp;nbsp;&lt;A href="https://www.dropbox.com/t/YtiyMYOrhy8EdsCp" target="_blank"&gt;https://www.dropbox.com/t/YtiyMYOrhy8EdsCp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Your method of calculating the percentage does not seem to be consistant. Please advise if I am missing somthing&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Increse/Decrese = 
VAR ProductTable = CALCULATETABLE ( Prices, ALLEXCEPT ( Prices, Prices[Product] ) )
VAR BaseDate = MINX ( ProductTable, Prices[Date] )
VAR CurrentDate = MAX ( Prices[Date] )
VAR BasePrice = MAXX ( FILTER ( ProductTable, Prices[Date] = BaseDate ), Prices[Price] )
VAR CurrentPrice = MAX ( Prices[Price] )
VAR DiffirencePercent = FORMAT ( DIVIDE ( ABS ( CurrentPrice - BasePrice ), BasePrice ), "Percent" )
RETURN
    IF ( 
        CurrentDate = BaseDate,
        "Base Price",
        IF ( 
            CurrentPrice &amp;gt;= BasePrice,
            DiffirencePercent &amp;amp; " Increase",
            DiffirencePercent &amp;amp; " Decrease"
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2022 04:50:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Making-an-index-for-prices/m-p/2559277#M72761</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-05T04:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Making an index for prices</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Making-an-index-for-prices/m-p/2564336#M73023</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 14:44:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Making-an-index-for-prices/m-p/2564336#M73023</guid>
      <dc:creator>ase</dc:creator>
      <dc:date>2022-06-07T14:44:10Z</dc:date>
    </item>
  </channel>
</rss>

