<?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 TotalYTD show 0 value when month value is 0 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4099765#M162694</link>
    <description>&lt;P&gt;I have a problem with the TOTALYTD function in Power BI shown below picture:&lt;BR /&gt;I create a Measure Rate to calculation ratio of each month = (sum2 column/sum 1&amp;nbsp;column) *100&lt;/P&gt;&lt;P&gt;Then YTD Rate =&amp;nbsp;TOTALYTD([rate],dim_month[Start of Month]). In the 2023-04 period, YTD rate = 0. The correct result must be equal to&amp;nbsp;the 2023-03 period. Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 09:03:35 GMT</pubDate>
    <dc:creator>HaHothingoc</dc:creator>
    <dc:date>2024-08-14T09:03:35Z</dc:date>
    <item>
      <title>TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4099765#M162694</link>
      <description>&lt;P&gt;I have a problem with the TOTALYTD function in Power BI shown below picture:&lt;BR /&gt;I create a Measure Rate to calculation ratio of each month = (sum2 column/sum 1&amp;nbsp;column) *100&lt;/P&gt;&lt;P&gt;Then YTD Rate =&amp;nbsp;TOTALYTD([rate],dim_month[Start of Month]). In the 2023-04 period, YTD rate = 0. The correct result must be equal to&amp;nbsp;the 2023-03 period. Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 09:03:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4099765#M162694</guid>
      <dc:creator>HaHothingoc</dc:creator>
      <dc:date>2024-08-14T09:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4100169#M162707</link>
      <description>&lt;P&gt;This ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;Data &amp;gt;&amp;gt; Table Name :&amp;nbsp;PreviousNonZero&lt;BR /&gt;Date,YTD_Rate&lt;BR /&gt;01-01-2013,0.50&lt;BR /&gt;02-01-2013,0.60&lt;BR /&gt;03-01-2013,0.90&lt;BR /&gt;04-01-2013,0.00&lt;BR /&gt;05-01-2013,1.20&lt;BR /&gt;06-01-2013,0.00&lt;BR /&gt;07-01-2013,0.00&lt;BR /&gt;08-01-2013,0.00&lt;BR /&gt;09-01-2013,1.82&lt;BR /&gt;10-01-2013,0.00&lt;BR /&gt;11-01-2013,0.00&lt;BR /&gt;12-01-2013,0.00&lt;BR /&gt;&lt;BR /&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;LI-CODE lang="markup"&gt;NonZeroValue = 

VAR curr_date =
    MAX ( 'PreviousNonZero'[Date] )
VAR SummarizeVar =
    FILTER (
        SUMMARIZE (
            ALLSELECTED ( 'PreviousNonZero' ),
            'PreviousNonZero'[Date],
            "YTD_Rate", SUM ( 'PreviousNonZero'[YTD_Rate] )
        ),
        [Date] &amp;lt; curr_date
            &amp;amp;&amp;amp; [YTD_Rate] &amp;lt;&amp;gt; 0
    )

VAR FilterVar =
    FILTER ( SummarizeVar, [YTD_Rate] &amp;gt;0)

RETURN
    IF (  SUM ( 'PreviousNonZero'[YTD_Rate] ) = 0, MAXX ( FilterVar, [YTD_Rate] ),  SUM ( 'PreviousNonZero'[YTD_Rate] ) )&lt;/LI-CODE&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, 14 Aug 2024 15:32:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4100169#M162707</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-08-14T15:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4101270#M162748</link>
      <description>&lt;P&gt;Thank you for your support.&lt;BR /&gt;&amp;nbsp;That's exactly my expected result.&amp;nbsp; The YTD Rate column is a measure and now it has the formula as below:&lt;BR /&gt;&amp;nbsp;YTD Rate = TOTALYTD([rate],dim_month[Start of Month])&lt;BR /&gt;&amp;nbsp;Can we modify the formula of the YTD Rate to get that result or it's just a be created new measure as you provide as above?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 01:57:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4101270#M162748</guid>
      <dc:creator>HaHothingoc</dc:creator>
      <dc:date>2024-08-15T01:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4101988#M162770</link>
      <description>&lt;P&gt;Just assign&amp;nbsp;&lt;SPAN&gt;YTD Rate&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;measure into a variable and use that variable in my measure.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 09:07:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4101988#M162770</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-08-15T09:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4105125#M162912</link>
      <description>&lt;P&gt;I have use this formula but the result as below:&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 07:09:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4105125#M162912</guid>
      <dc:creator>HaHothingoc</dc:creator>
      <dc:date>2024-08-17T07:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4105420#M162918</link>
      <description>&lt;P&gt;Can you share your PBI file ?&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 20:26:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4105420#M162918</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-08-17T20:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4106097#M162941</link>
      <description>&lt;P&gt;I sent the PBI file in a private message. Please check it in your box.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 04:08:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4106097#M162941</guid>
      <dc:creator>HaHothingoc</dc:creator>
      <dc:date>2024-08-19T04:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4110718#M163140</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="791398" data-lia-user-login="HaHothingoc" class="lia-mention lia-mention-user"&gt;HaHothingoc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you tell me if your problem has been solved?&lt;/P&gt;
&lt;P&gt;If it is, kindly Accept it as the solution. More people will benefit from it.&lt;/P&gt;
&lt;P&gt;Or you are still confused about it, please provide me with more details about your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 08:21:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4110718#M163140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-21T08:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4110723#M163141</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN&gt;Zhengdong Xu,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This issue is not resolved. Mr.Sachin is checking my pbix file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 08:26:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4110723#M163141</guid>
      <dc:creator>HaHothingoc</dc:creator>
      <dc:date>2024-08-21T08:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4111378#M163164</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="791398" data-lia-user-login="HaHothingoc" class="lia-mention lia-mention-user"&gt;HaHothingoc&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;The PBIX file that you shared had problems.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Please import the data into the file and then share it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 13:41:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4111378#M163164</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-08-21T13:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: TotalYTD show 0 value when month value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4112800#M163213</link>
      <description>&lt;P&gt;Dear Mr.Sachin.&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;BR /&gt;While mirroring data to an Excel file and making a sample to send to you I solved this issue because the relationship in the semantic model is incorrect.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 06:39:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TotalYTD-show-0-value-when-month-value-is-0/m-p/4112800#M163213</guid>
      <dc:creator>HaHothingoc</dc:creator>
      <dc:date>2024-08-22T06:39:36Z</dc:date>
    </item>
  </channel>
</rss>

