<?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: DAX to calculate only if X-Axis value is less than a value based on the current year in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298384#M131663</link>
    <description>&lt;P&gt;Thank you Parry, but not quite.&amp;nbsp; The formula is changing the actual rates to incorrect values and the rates&amp;nbsp;were previously correct.&amp;nbsp; I just need for the rates to not show if the year isn't applicable.&amp;nbsp; For one example, if we had a few students from the 2016&amp;nbsp;transfer student cohort graduate this year (their 2nd year enrolled), then we don't want their 3rd, 4th, 5th, or 6th year graduation rates to populate because that cohort's 3rd, 4th, 5th, and 6th year hasn't occurred yet.&amp;nbsp; Since we are calculating cumulative rates, technically the cumulative 3rd, 4th, 5th, and 6th year graduation rates would be the same as the 2nd at this point in time, however, since the 3rd, 4th, 5th, and 6th year graduation years haven't occurred yet for the 2016 cohort, in order to avoid confusing the viewer we wouldn't want them represented with the cumulative data.&amp;nbsp; Maybe I need some kind of filter or if statement instead?&amp;nbsp; I can't seem to figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lindsay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 19:54:31 GMT</pubDate>
    <dc:creator>LindsayK</dc:creator>
    <dc:date>2017-11-07T19:54:31Z</dc:date>
    <item>
      <title>DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298362#M131651</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a seasoned Excel user, but new to Power BI and DAX.&amp;nbsp; For my current project, I have measures such as this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3rd Year Transfers Graduation (Cumulative) = [Count of 3rd Year Transfers Graduated (Cumulative)]/[Distinct Count of Transfers ID]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that return cumulative graduation percentage rates (for 2nd year grad rate, 3rd Year&lt;SPAN&gt;&amp;nbsp;grad rate&lt;/SPAN&gt;, 4th year&lt;SPAN&gt;&amp;nbsp;grad rate&lt;/SPAN&gt;, 5th year&lt;SPAN&gt;&amp;nbsp;grad rate&lt;/SPAN&gt;, 6th year&lt;SPAN&gt;&amp;nbsp;grad rate&lt;/SPAN&gt;) for each cohort year on the X-Axis on a column chart (see&amp;nbsp;pic&amp;nbsp;below):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure works great to provide the cumulative graduation rates for each cohort year on the X-Axis, however, for the&amp;nbsp;individual cohort years on the X-Axis, we&amp;nbsp;don't want to display any graduation rate for&amp;nbsp;the graduation&amp;nbsp;years that haven't occurred yet.&amp;nbsp; For example, the cohort year 2016 on the X-Axis is showing grad rates for the 3rd year, 4th year, 5th year, and 6th year, but yet we have only just completed grad year 2017 so those grad years haven't actually occurred yet and those data representing them is misleading.&amp;nbsp; I did some research and tried the following formula, but it didn't work as expected.&amp;nbsp; Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Failed Formula) 2nd Year Transfers Graduation (Cumulative) = CALCULATE(DIVIDE([Count of 2nd Year Transfers Graduated (Cumulative)],[Distinct Count of Transfers ID]), 'Transfer_Student_Base_Dataset'[Cohort Year]&amp;lt;=year(TODAY()-1))&lt;/P&gt;&lt;P&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;&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;Many thanks in advance&amp;nbsp;:smileyhappy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lindsay&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 18:41:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298362#M131651</guid>
      <dc:creator>LindsayK</dc:creator>
      <dc:date>2017-11-07T18:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298364#M131652</link>
      <description>&lt;P&gt;at first look this looks wrong, seems like you want to go back to previous year:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;year(TODAY()-1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;correct calculation should be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;year(today())-1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 18:48:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298364#M131652</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2017-11-07T18:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298384#M131663</link>
      <description>&lt;P&gt;Thank you Parry, but not quite.&amp;nbsp; The formula is changing the actual rates to incorrect values and the rates&amp;nbsp;were previously correct.&amp;nbsp; I just need for the rates to not show if the year isn't applicable.&amp;nbsp; For one example, if we had a few students from the 2016&amp;nbsp;transfer student cohort graduate this year (their 2nd year enrolled), then we don't want their 3rd, 4th, 5th, or 6th year graduation rates to populate because that cohort's 3rd, 4th, 5th, and 6th year hasn't occurred yet.&amp;nbsp; Since we are calculating cumulative rates, technically the cumulative 3rd, 4th, 5th, and 6th year graduation rates would be the same as the 2nd at this point in time, however, since the 3rd, 4th, 5th, and 6th year graduation years haven't occurred yet for the 2016 cohort, in order to avoid confusing the viewer we wouldn't want them represented with the cumulative data.&amp;nbsp; Maybe I need some kind of filter or if statement instead?&amp;nbsp; I can't seem to figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lindsay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 19:54:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298384#M131663</guid>
      <dc:creator>LindsayK</dc:creator>
      <dc:date>2017-11-07T19:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298387#M131665</link>
      <description>&lt;P&gt;If it were a calculated column in an Excel table, the formula at the row level would look like this:&lt;/P&gt;&lt;P&gt;=IF([Cohort Year]&amp;lt;=YEAR(TODAY())-1,[Count of 2nd Year Graduated (Cumulative)]/[Distinct Count of ID],"")&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>Tue, 07 Nov 2017 20:15:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298387#M131665</guid>
      <dc:creator>LindsayK</dc:creator>
      <dc:date>2017-11-07T20:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298460#M131699</link>
      <description>&lt;P&gt;try this, giving idea based on your excel formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;myMeasure = 
var myCalculation = [Count of 2nd Year Graduated (Cumulative)]/[Distinct Count of ID]
return IF([Cohort Year]&amp;lt;=YEAR(TODAY())-1,myCalculation,BLANKI())&lt;/PRE&gt;&lt;P&gt;Change the name of my measure to whatever you want to call it.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 22:46:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/298460#M131699</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2017-11-07T22:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/299291#M132131</link>
      <description>&lt;P&gt;Thank you Parry.&amp;nbsp; The formula returns an error stating that "A single value for column 'Cohort Year' in table 'Transfer_Student_Base_Dataset cannot be determined.&amp;nbsp; This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."&amp;nbsp; I did some research on this error but I can't determine what might be needed to correct it.&amp;nbsp; Do you know if it's a simple fix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lindsay&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 20:59:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/299291#M132131</guid>
      <dc:creator>LindsayK</dc:creator>
      <dc:date>2017-11-08T20:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/299321#M132140</link>
      <description>&lt;P&gt;I don' have sample data but trying to figure out, try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;myMeasure = 
var myCalculation = [Count of 2nd Year Graduated (Cumulative)]/[Distinct Count of ID]
return IF(MAX([Cohort Year])&amp;lt;=YEAR(TODAY())-1,myCalculation,BLANK())&lt;/PRE&gt;&lt;P&gt;I assumed these are already measure in your data model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[Count of 2nd Year Graduated (Cumulative)]&lt;BR /&gt;[Distinct Count of ID]&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Nov 2017 21:52:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/299321#M132140</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2017-11-08T21:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/300286#M132585</link>
      <description>&lt;P&gt;Perfect Parry!&amp;nbsp; Thank you for being so patient and working through this with me.&amp;nbsp; This is an enormous help to us&amp;nbsp;:smileyvery-happy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Thank you, Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lindsay&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 20:25:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/300286#M132585</guid>
      <dc:creator>LindsayK</dc:creator>
      <dc:date>2017-11-09T20:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate only if X-Axis value is less than a value based on the current year</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/300315#M132605</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6225" data-lia-user-login="LindsayK" class="lia-mention lia-mention-user"&gt;LindsayK&lt;/a&gt;&amp;nbsp;glad to hear that I was able to help. that is what community all about. Feel free to reach out anytime. Took bit longer because was working without any sample data. :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;P&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 21:38:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/DAX-to-calculate-only-if-X-Axis-value-is-less-than-a-value-based/m-p/300315#M132605</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2017-11-09T21:38:39Z</dc:date>
    </item>
  </channel>
</rss>

