<?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 How to ignore unreported quarter in Year-to-date calculation? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-ignore-unreported-quarter-in-Year-to-date-calculation/m-p/2657923#M78686</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a year-to-date line graph of values that get updated every quarter. I'm trying to find a way to &lt;U&gt;not show quarters&lt;/U&gt; that haven't reported &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; values yet in the visual. Assume we are in Q3, I want to show &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; values up to (including) Q3 (So Q1, Q2, Q3) but need to have the line graph stop at Q3 and not go forward.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To complicate things, I have other values (&lt;FONT color="#339966"&gt;Target&lt;/FONT&gt; and &lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt;) that are indeed shown for the full-year (meaning for all quarters regardless of what quarter we are in). To summarize, I want the line chart to:&lt;BR /&gt;&lt;BR /&gt;- Show &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; only till the point that we have actuals in the data&lt;BR /&gt;- Show &lt;FONT color="#339966"&gt;Target&lt;/FONT&gt; and &lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt; for the full-year regardless of how many&amp;nbsp;&lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; values we have.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Of course for the previous years we will always have All three values for all the quarters since they have passed and past quarters will always have Actual values.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Important to remember&lt;/STRONG&gt;&lt;BR /&gt;- Also, I'm able to do exactly this using non-YTD values (Total values in other words) and PBI engine easily picks up that I have no total value for &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; after Q3 and stops there while continuing to show the lines for &lt;FONT color="#339966"&gt;Target&lt;/FONT&gt; and &lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt;. I'm looking to achieve the same using YTD formula.&lt;BR /&gt;&lt;BR /&gt;- I have one table containing all the values and a column (called "Version") in the same table labelling each value as "&lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt;" "&lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt;" and "&lt;FONT color="#339966"&gt;Target&lt;/FONT&gt;". The same table also has a column called "Reporting Date" that specifies the period for which that value is applicable for.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;FONT size="2"&gt;This is an example showing how I want the Actual line to end at Q3 (or whatever the last reported quarter is) and how the other lines should continue regardless.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is the formula I am using to calculate the Total Values&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Total Values =&amp;nbsp;&lt;BR /&gt;CALCULATE (&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;SUM ( 'Inventory Data'[Value] ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;And here is the formula I use to calculate YTD values&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Values YTD = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;TOTALYTD ( &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Metrics[Total Values], &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;'Calendar Table'[Date],&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;"06/30"&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I also have a measure to calculate the date that the last &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; was reported if anyone finds it useful&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;LastActualDate = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR MAXActualDate = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;MAX ( 'Inventory Data'[Reporting Date] ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;FILTER(ALL('Inventory Data'), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;[Version] = "Actual"&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;MAXActualDate&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jul 2022 03:14:55 GMT</pubDate>
    <dc:creator>rushi</dc:creator>
    <dc:date>2022-07-25T03:14:55Z</dc:date>
    <item>
      <title>How to ignore unreported quarter in Year-to-date calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-ignore-unreported-quarter-in-Year-to-date-calculation/m-p/2657923#M78686</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a year-to-date line graph of values that get updated every quarter. I'm trying to find a way to &lt;U&gt;not show quarters&lt;/U&gt; that haven't reported &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; values yet in the visual. Assume we are in Q3, I want to show &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; values up to (including) Q3 (So Q1, Q2, Q3) but need to have the line graph stop at Q3 and not go forward.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To complicate things, I have other values (&lt;FONT color="#339966"&gt;Target&lt;/FONT&gt; and &lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt;) that are indeed shown for the full-year (meaning for all quarters regardless of what quarter we are in). To summarize, I want the line chart to:&lt;BR /&gt;&lt;BR /&gt;- Show &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; only till the point that we have actuals in the data&lt;BR /&gt;- Show &lt;FONT color="#339966"&gt;Target&lt;/FONT&gt; and &lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt; for the full-year regardless of how many&amp;nbsp;&lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; values we have.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Of course for the previous years we will always have All three values for all the quarters since they have passed and past quarters will always have Actual values.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Important to remember&lt;/STRONG&gt;&lt;BR /&gt;- Also, I'm able to do exactly this using non-YTD values (Total values in other words) and PBI engine easily picks up that I have no total value for &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; after Q3 and stops there while continuing to show the lines for &lt;FONT color="#339966"&gt;Target&lt;/FONT&gt; and &lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt;. I'm looking to achieve the same using YTD formula.&lt;BR /&gt;&lt;BR /&gt;- I have one table containing all the values and a column (called "Version") in the same table labelling each value as "&lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt;" "&lt;FONT color="#FF00FF"&gt;Forecast&lt;/FONT&gt;" and "&lt;FONT color="#339966"&gt;Target&lt;/FONT&gt;". The same table also has a column called "Reporting Date" that specifies the period for which that value is applicable for.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;FONT size="2"&gt;This is an example showing how I want the Actual line to end at Q3 (or whatever the last reported quarter is) and how the other lines should continue regardless.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is the formula I am using to calculate the Total Values&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Total Values =&amp;nbsp;&lt;BR /&gt;CALCULATE (&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;SUM ( 'Inventory Data'[Value] ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;And here is the formula I use to calculate YTD values&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Values YTD = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;TOTALYTD ( &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Metrics[Total Values], &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;'Calendar Table'[Date],&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;"06/30"&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I also have a measure to calculate the date that the last &lt;FONT color="#FF0000"&gt;Actual&lt;/FONT&gt; was reported if anyone finds it useful&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;LastActualDate = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR MAXActualDate = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;MAX ( 'Inventory Data'[Reporting Date] ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;FILTER(ALL('Inventory Data'), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;[Version] = "Actual"&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;MAXActualDate&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 03:14:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-ignore-unreported-quarter-in-Year-to-date-calculation/m-p/2657923#M78686</guid>
      <dc:creator>rushi</dc:creator>
      <dc:date>2022-07-25T03:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore unreported quarter in Year-to-date calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-ignore-unreported-quarter-in-Year-to-date-calculation/m-p/2658014#M78689</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="404548" data-lia-user-login="rushi" class="lia-mention lia-mention-user"&gt;rushi&lt;/a&gt; , Try a measure like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Values YTD =&lt;BR /&gt;var _max =MAXX(allselected('Inventory Data') , 'Inventory Data'[Reporting Date] )&lt;BR /&gt;return &lt;BR /&gt;if( 'Calendar Table'[Date] &amp;lt;=_max , &lt;BR /&gt;TOTALYTD (&lt;BR /&gt;Metrics[Total Values],&lt;BR /&gt;'Calendar Table'[Date],&lt;BR /&gt;"06/30"&lt;BR /&gt;), blank())&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 04:19:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-ignore-unreported-quarter-in-Year-to-date-calculation/m-p/2658014#M78689</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-07-25T04:19:56Z</dc:date>
    </item>
  </channel>
</rss>

