<?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: Index chart - specifying a particular data value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262764#M21076</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;That is certainly getting me a result so thank you - just need to do a little bit more testing to check the right figures are coming out. There is however something I don't understand. If I try and do this in the data table rather than as a table in the visual I feel I should be able to create a calculated column that provides the index. Simplifying without the slicer I used&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test1 = 
var index_year = 2008
var Baseline = calculate(SUM('Table'[Income]), FILTER(ALL('Table'[Year End]), 'Table'[Year End] = index_year))
RETURN
DIVIDE('Table'[Income], [Baseline])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The result is I get a result of 1 in the column for all rows where Year End = 2008 but an empty field for all others. This implies to me that for 2008 it is calculating the Baseline variable correctly but in other years a value isn't being returned. I'm assuming this has to do with the variable being calculated by looking per row so when it filters for a 2008 value for rows other than 2008 nothing is returned but I feel I should be able to somehow set it to filter off the whole table. Any pointers would be helpful as I'm trying to improve my understanding not just copy solutions!&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jul 2020 16:01:23 GMT</pubDate>
    <dc:creator>JonClemo</dc:creator>
    <dc:date>2020-07-30T16:01:23Z</dc:date>
    <item>
      <title>Index chart - specifying a particular data value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1261819#M21021</link>
      <description>&lt;P&gt;I am trying to create a summary table of income for a number of organisations over a number of years, categorised by size with a base year index column. The end result would look something like this containing results for multiple years&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;The report is intended for reuse and update so I am trying minimise the steps if any data is refreshed or visuals changed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with income for each organsiation for each year&lt;/P&gt;&lt;P&gt;I used a switch function to create a column that categorises that data into custom bands&lt;/P&gt;&lt;P&gt;I created a table using summarise that groups by year column and income by band with roll-up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives me which is correct&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now want to add the index column&lt;/P&gt;&lt;P&gt;The formula for the income index would be [income]/[income total in 2008]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I could simply hardcode in the number but wanted to reference it. What I can’t understand if how to specify the reference or query in the formula to get a specific value returned. Essentially it would be&lt;/P&gt;&lt;P&gt;Select income where year end = 2008 AND category is blank (or total if I knew how to name the rollup row)&lt;/P&gt;&lt;P&gt;Where I got to is&lt;/P&gt;&lt;P&gt;Index = 'Table'[Income]/(CALCULATE(sum('Table'[Income]), 'Table'[Year End] =2008, 'Table'[Size By Income] = blank()))&lt;/P&gt;&lt;P&gt;But this only seems to work for the 2008 total row – otherwise it seems to not get the reference and return zero. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked at the answer here which seems to use variables which I've not used in DAX before - what am I not seeing and what are my options? many thanks&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Creating-index-chart-showing-trend-from-the-baseline-year/m-p/725192#M1518" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Creating-index-chart-showing-trend-from-the-baseline-year/m-p/725192#M1518&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 10:59:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1261819#M21021</guid>
      <dc:creator>JonClemo</dc:creator>
      <dc:date>2020-07-30T10:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Index chart - specifying a particular data value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262023#M21024</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="125633" data-lia-user-login="JonClemo" class="lia-mention lia-mention-user"&gt;JonClemo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share sample data, or a sample pbix file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Index =
DIVIDE (
    'Table'[Income],
    CALCULATE (
        SUM ( 'Table'[Income] ),
        'Table'[Year End] = 'Table'[Year End] - 1
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 11:17:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262023#M21024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-30T11:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Index chart - specifying a particular data value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262080#M21028</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;your suggestion produces the error below - but if I have understood it correctly I think it's trying to answer something slightly different which is 'current year divided by last year' whereas I am after 'current year divided by a specified year in the past'&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some sample data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communityactionnorfolk-my.sharepoint.com/:x:/g/personal/jonathan_clemo_communityactionnorfolk_org_uk/ESHvgBoygHRPntcpj11Y_gkBWQB-YFhGw_4YR8tK-dwXlQ?e=kyyZBZ" target="_blank"&gt;Test_Index Chart.xlsx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In pulling this out I realised that the base year reference would also need to change based on the category&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 11:49:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262080#M21028</guid>
      <dc:creator>JonClemo</dc:creator>
      <dc:date>2020-07-30T11:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Index chart - specifying a particular data value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262132#M21031</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="125633" data-lia-user-login="JonClemo" class="lia-mention lia-mention-user"&gt;JonClemo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you determine the specified year in the past.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create&amp;nbsp; a separate Year Table. Add this as a slicer. This will detremine your index value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&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;Create Measures&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Income = SUM('Table'[Income])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Selected year Index = SELECTEDVALUE(YearTable[Year End])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure 5 = 
var selyear = [Selected year Index]
var sumyear = CALCULATE(SUM('Table'[Income]),FILTER(ALL('Table'[Year End]), 'Table'[Year End] = selyear))
RETURN
DIVIDE ([Total Income],sumyear)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Harsh Nathani&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 12:26:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262132#M21031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-30T12:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Index chart - specifying a particular data value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262764#M21076</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;That is certainly getting me a result so thank you - just need to do a little bit more testing to check the right figures are coming out. There is however something I don't understand. If I try and do this in the data table rather than as a table in the visual I feel I should be able to create a calculated column that provides the index. Simplifying without the slicer I used&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test1 = 
var index_year = 2008
var Baseline = calculate(SUM('Table'[Income]), FILTER(ALL('Table'[Year End]), 'Table'[Year End] = index_year))
RETURN
DIVIDE('Table'[Income], [Baseline])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The result is I get a result of 1 in the column for all rows where Year End = 2008 but an empty field for all others. This implies to me that for 2008 it is calculating the Baseline variable correctly but in other years a value isn't being returned. I'm assuming this has to do with the variable being calculated by looking per row so when it filters for a 2008 value for rows other than 2008 nothing is returned but I feel I should be able to somehow set it to filter off the whole table. Any pointers would be helpful as I'm trying to improve my understanding not just copy solutions!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 16:01:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1262764#M21076</guid>
      <dc:creator>JonClemo</dc:creator>
      <dc:date>2020-07-30T16:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Index chart - specifying a particular data value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1263289#M21099</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="125633" data-lia-user-login="JonClemo" class="lia-mention lia-mention-user"&gt;JonClemo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on what I have understood:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your index is dynamic and changes based on the year you select in a slicer. Table store static values and cannot generate dynamic values. Calculated Columns work best when you want to categorise or want to eat up on your memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggest see this video :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=03E0f-RyRn4" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=03E0f-RyRn4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=xV-KwuSDFMQ" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=xV-KwuSDFMQ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=DwuAypulTLA" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=DwuAypulTLA&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Test1 = 
var index_year = 2008
var Baseline = calculate(SUM('Table'[Income]), FILTER(ALL('Table'[Year End]), 'Table'[Year End] = index_year))
RETURN
DIVIDE('Table'[Income], [Baseline])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will try my best to explain in simple terms. I hope i make sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the Filter Part -&amp;gt; You are filtering the table column&amp;nbsp; [Year End] where Table[Year End] = 2018. So this will give you only rows of the table where year end = 2018. So incase your table has 100 rows out of which 5 rows are 2018. these 5 rows will be returned.&lt;/P&gt;&lt;P&gt;Post that you are adding the income in these 5 rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now you are dividing the Income of all rows with the baseline (baseline has values only for 5 rows). So for other rows it is income divide by blank.&amp;nbsp; And for 2018, you get 1. Now change the column type to decimal you may get 0.xx values in rows where year is 2018.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this made sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 21:22:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1263289#M21099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-30T21:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Index chart - specifying a particular data value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1263941#M21125</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll have a watch. It's not the function of the formula that I am having trouble understanding I guess it is the way the variable works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per your illustration - table has 100 rows, this is filtered to five then summed, which gives a value say 75. I am expected that value to then be set. As a result in the second part, each and every row will have the income for that row divided by 75.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is happening is as per your explanation is baseline only has a value for those five rows.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 06:05:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-chart-specifying-a-particular-data-value/m-p/1263941#M21125</guid>
      <dc:creator>JonClemo</dc:creator>
      <dc:date>2020-07-31T06:05:19Z</dc:date>
    </item>
  </channel>
</rss>

