<?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: Calculation in DAX measure returing all the rows. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Calculation-in-DAX-measure-returing-all-the-rows/m-p/1244059#M24889</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&amp;nbsp; for your reply. I will check the links which you have shared. However my issue got resolved. There was some table relatioship issue was there because of&amp;nbsp; that the measure not returing the correct answer.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 07:47:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-07-23T07:47:25Z</dc:date>
    <item>
      <title>Calculation in DAX measure returing all the rows.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calculation-in-DAX-measure-returing-all-the-rows/m-p/1242178#M24871</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a measure using below query. Logic wise it is correct but the only thing I am facing right now is that It is returning all the rows from the table. What I observe is I am getting this output because in Var R1 and R2 I am doing some calculation. As you can see below i am adding 1 and also multiplying it with 10. This is applying to each row in the table. Can someone please let me know how should I write R1 and R2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have a date slicer in the report page. where I am selecting only 1 date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IndexBaseValue =&lt;BR /&gt;Var Mindate = CALCULATE(MIN(IndexFundNAV[Date]),ALL(IndexFundNAV[Date]))&lt;BR /&gt;Var Maxdate = CALCULATE(MAX(IndexFundNAV[Date]))&lt;BR /&gt;Var Currentdate = IF(Maxdate&amp;lt;Mindate,Mindate,Maxdate)&lt;BR /&gt;Var Diffdays = DATEDIFF(Mindate,Currentdate,DAY)&lt;BR /&gt;Var R1 = CALCULATE(10*(1+[RITD%]))&lt;BR /&gt;Var R2 = CALCULATE((10*(&lt;SPAN&gt;1+[RITD%]))^(Diffdays/365))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Var Result = if (Diffdays&amp;lt;365,R1,R2)&lt;/P&gt;&lt;P&gt;Return&lt;BR /&gt;Result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example for desired output:&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IndexName IndexBaseValue&lt;/P&gt;&lt;P&gt;28-Sep-19&amp;nbsp; &amp;nbsp; &amp;nbsp;ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently getting:&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IndexName IndexBaseValue&lt;/P&gt;&lt;P&gt;28-Sep-19&amp;nbsp; &amp;nbsp; &amp;nbsp;ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/P&gt;&lt;P&gt;28-Sep-19&amp;nbsp; &amp;nbsp; &amp;nbsp;ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/P&gt;&lt;P&gt;28-Sep-19&amp;nbsp; &amp;nbsp; &amp;nbsp;ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/P&gt;&lt;P&gt;28-Sep-19&amp;nbsp; &amp;nbsp; &amp;nbsp;ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8.9&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;&amp;nbsp;&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;&amp;nbsp;&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;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 15:00:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calculation-in-DAX-measure-returing-all-the-rows/m-p/1242178#M24871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-22T15:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation in DAX measure returing all the rows.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calculation-in-DAX-measure-returing-all-the-rows/m-p/1242355#M24872</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;- A little difficult to tell what is going on, sample source data might help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 15:57:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calculation-in-DAX-measure-returing-all-the-rows/m-p/1242355#M24872</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-07-22T15:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation in DAX measure returing all the rows.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calculation-in-DAX-measure-returing-all-the-rows/m-p/1244059#M24889</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&amp;nbsp; for your reply. I will check the links which you have shared. However my issue got resolved. There was some table relatioship issue was there because of&amp;nbsp; that the measure not returing the correct answer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 07:47:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calculation-in-DAX-measure-returing-all-the-rows/m-p/1244059#M24889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-23T07:47:25Z</dc:date>
    </item>
  </channel>
</rss>

