<?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: Change value in colum of stock prices depending on slicer date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849647#M185084</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1372076" data-lia-user-login="DoriD" class="lia-mention lia-mention-user"&gt;DoriD&lt;/a&gt;&amp;nbsp;Thanks, based on your initial query, it seems you were looking for the difference between minimum and maximum dates. However you can also daily change in many ways. One way is to use visual calculation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, bring the Min Stock Price measure in a line chart and Date in x-axis.&lt;/P&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Min Stock Price =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX(StockPrice[StockPrice]),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; StockPrice[Date] = MIN(StockPrice[Date])&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;Then open the visual calculation:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by default, it opens the PREVIOUS function on the measure. But update that measure a little:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Versus previous =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;IF(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ISBLANK(PREVIOUS([Date])), &lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; BLANK(),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; DIVIDE( [Min Stock Price] / PREVIOUS([Min Stock Price]), 1) - 1&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;You may hide your main measure&amp;nbsp;Min Stock Price.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;This measure basically hiding the current date value and showing difference from next day onwards.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;To show the value in percentages, you also need to do bit of formatting of your visual calculation measure.&amp;nbsp; This visual calc formatting option comes under Format -&amp;gt; Properties&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;img /&gt;
&lt;P&gt;Now below is the output:&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;Since for this example, I took dummy data, hence line mostly looks flat, but this should work I thik.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this helps to resolve your problem, then please mark it as solution.&lt;/P&gt;
&lt;P&gt;Thanks - Samrat&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Oct 2025 07:51:43 GMT</pubDate>
    <dc:creator>samratpbi</dc:creator>
    <dc:date>2025-10-14T07:51:43Z</dc:date>
    <item>
      <title>Change value in colum of stock prices depending on slicer date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849304#M185076</link>
      <description>&lt;P&gt;I have a data set with stock prices:&lt;/P&gt;&lt;P&gt;The first column contains the date, second the company and third the stock price.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Furthermore, I have a slicer for the date (&lt;EM&gt;between&amp;nbsp;&lt;/EM&gt;option) and a slicer for the company.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to show in the desktop a table (Matrix) with Date values as rows (based on the slicer) and columns with companies (based on another slicer).&lt;/P&gt;&lt;P&gt;The values I want to have in that matrix are the changes in stock price compared to the stock price on the earlierst date of the slicer:&lt;BR /&gt;For each date and company in the table the Stock price on the date divided by the stock price on the earliest date of the slicer minus 1.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have tried multiple attempts by defining measures but without success so far. If anyone has a tip or idea that would be greatly appreciated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Oct 2025 18:54:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849304#M185076</guid>
      <dc:creator>DoriD</dc:creator>
      <dc:date>2025-10-13T18:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Change value in colum of stock prices depending on slicer date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849336#M185078</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1372076" data-lia-user-login="DoriD" class="lia-mention lia-mention-user"&gt;DoriD&lt;/a&gt;&amp;nbsp;, I first created a dummy data for this like below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then created 2 simple measures:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Min Stock Price =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX(StockPrice[StockPrice]),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; StockPrice[Date] = MIN(StockPrice[Date])&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Max Stock Price =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX(StockPrice[StockPrice]),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; StockPrice[Date] = MAX(StockPrice[Date])&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;then the measure to calculate the difference:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Stock Price Change =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;DIVIDE([Max Stock Price], [Min Stock Price], 0) - 1&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Now, in the visual, added Date slicer and added Company slicer&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;img /&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;If this helps to resolve your problem, then please mark it as solution.&lt;/P&gt;
&lt;P&gt;Thanks - Samrat&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Oct 2025 22:30:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849336#M185078</guid>
      <dc:creator>samratpbi</dc:creator>
      <dc:date>2025-10-13T22:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Change value in colum of stock prices depending on slicer date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849514#M185080</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Many thanks for your help and effort! Unfortunately your proposal does not match my preferred outcome. In your specific example I would like that the all dates 'x' between 19-01 and 18-02 are shown (per company) with stock change value equal to stock price on date x divided by stock price on date 19-01 minus 1. In that way I could eventually show a graph of the relative stock price development in the selected date range and compare comA and comB. Much appreciated of you could let me know any ideas you might have. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 05:40:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849514#M185080</guid>
      <dc:creator>DoriD</dc:creator>
      <dc:date>2025-10-14T05:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Change value in colum of stock prices depending on slicer date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849647#M185084</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1372076" data-lia-user-login="DoriD" class="lia-mention lia-mention-user"&gt;DoriD&lt;/a&gt;&amp;nbsp;Thanks, based on your initial query, it seems you were looking for the difference between minimum and maximum dates. However you can also daily change in many ways. One way is to use visual calculation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, bring the Min Stock Price measure in a line chart and Date in x-axis.&lt;/P&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Min Stock Price =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX(StockPrice[StockPrice]),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; StockPrice[Date] = MIN(StockPrice[Date])&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;Then open the visual calculation:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by default, it opens the PREVIOUS function on the measure. But update that measure a little:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Versus previous =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;IF(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ISBLANK(PREVIOUS([Date])), &lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; BLANK(),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; DIVIDE( [Min Stock Price] / PREVIOUS([Min Stock Price]), 1) - 1&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;You may hide your main measure&amp;nbsp;Min Stock Price.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;This measure basically hiding the current date value and showing difference from next day onwards.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;To show the value in percentages, you also need to do bit of formatting of your visual calculation measure.&amp;nbsp; This visual calc formatting option comes under Format -&amp;gt; Properties&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;img /&gt;
&lt;P&gt;Now below is the output:&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;Since for this example, I took dummy data, hence line mostly looks flat, but this should work I thik.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this helps to resolve your problem, then please mark it as solution.&lt;/P&gt;
&lt;P&gt;Thanks - Samrat&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Oct 2025 07:51:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849647#M185084</guid>
      <dc:creator>samratpbi</dc:creator>
      <dc:date>2025-10-14T07:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change value in colum of stock prices depending on slicer date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849813#M185091</link>
      <description>&lt;P&gt;Thank you very much. I wasn't aware of the in visual calculations. It worked by replacing in your formula 'previous' with 'first'.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 11:06:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-value-in-colum-of-stock-prices-depending-on-slicer-date/m-p/4849813#M185091</guid>
      <dc:creator>DoriD</dc:creator>
      <dc:date>2025-10-14T11:06:15Z</dc:date>
    </item>
  </channel>
</rss>

