<?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 Replacing blanks with previous count in continuous line chart in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3873682#M151312</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I'm hoping someone will be able to help me modify this measure.&amp;nbsp;I've tried a number of ways to make it work but can't quite seem to get it right. Where there is a blank week (Wk 9 in this example, I would like the figure from the previous week, e.g. 100 (Wk 8), so that my line is continuous and doesn't drop to 0. My measure so far is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2024_cate_tickets =&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'cate' ),&lt;BR /&gt;'cate'[week_num] &amp;lt;= MAX ( 'cate'[week_num] )&lt;BR /&gt;&amp;amp;&amp;amp; 'cate'[date_registered] &amp;lt;= MAX ( 'cate'[date_registered] )&lt;BR /&gt;&amp;amp;&amp;amp; 'cate'[event] = "cate 2024"&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2024 00:45:04 GMT</pubDate>
    <dc:creator>onedayover</dc:creator>
    <dc:date>2024-04-29T00:45:04Z</dc:date>
    <item>
      <title>Replacing blanks with previous count in continuous line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3873682#M151312</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I'm hoping someone will be able to help me modify this measure.&amp;nbsp;I've tried a number of ways to make it work but can't quite seem to get it right. Where there is a blank week (Wk 9 in this example, I would like the figure from the previous week, e.g. 100 (Wk 8), so that my line is continuous and doesn't drop to 0. My measure so far is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2024_cate_tickets =&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'cate' ),&lt;BR /&gt;'cate'[week_num] &amp;lt;= MAX ( 'cate'[week_num] )&lt;BR /&gt;&amp;amp;&amp;amp; 'cate'[date_registered] &amp;lt;= MAX ( 'cate'[date_registered] )&lt;BR /&gt;&amp;amp;&amp;amp; 'cate'[event] = "cate 2024"&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 00:45:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3873682#M151312</guid>
      <dc:creator>onedayover</dc:creator>
      <dc:date>2024-04-29T00:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing blanks with previous count in continuous line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3873967#M151315</link>
      <description>&lt;LI-CODE lang="markup"&gt;2024_cate_tickets = 
VAR CurrentCount = COUNTROWS (
    FILTER (
        ALL ( 'cate' ),
        'cate'[week_num] &amp;lt;= MAX ( 'cate'[week_num] )
        &amp;amp;&amp;amp; 'cate'[date_registered] &amp;lt;= MAX ( 'cate'[date_registered] )
        &amp;amp;&amp;amp; 'cate'[event] = "cate 2024"
    )
)
RETURN
    IF(
        ISBLANK(CurrentCount),
        CALCULATE(
            LASTNONBLANK('cate'[week_num], CurrentCount),
            FILTER(ALL('cate'), 'cate'[week_num] &amp;lt; MAX('cate'[week_num]))
        ),
        CurrentCount
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Apr 2024 03:01:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3873967#M151315</guid>
      <dc:creator>aduguid</dc:creator>
      <dc:date>2024-04-29T03:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing blanks with previous count in continuous line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3874007#M151318</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;aduguid,&lt;BR /&gt;Thank you for your reply.&lt;BR /&gt;I just tried your code and it the graph didn't change. Do you have any further suggestions?&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 03:15:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3874007#M151318</guid>
      <dc:creator>onedayover</dc:creator>
      <dc:date>2024-04-29T03:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing blanks with previous count in continuous line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3874115#M151321</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but I assume you are not using dimension table, or I assume cate table does not contain wk9 data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try using date dimension table.&lt;/P&gt;
&lt;P&gt;1. Create date dimension table.&lt;/P&gt;
&lt;P&gt;2. Create a relationship between date dimension table &amp;amp; cate table&lt;/P&gt;
&lt;P&gt;3. Use x-axis from date dimension table&lt;/P&gt;
&lt;P&gt;4. In the measure, input column names from date dimension table.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 04:58:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3874115#M151321</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-04-29T04:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing blanks with previous count in continuous line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3900893#M152013</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;aduguid, apologies for the delay in getting back to you. You were correct on both counts - I wasn't&amp;nbsp;using a dimension table and the cate table did not contain wk9 data. I fixed this as you outlined and got the graph to display exactly how I needed it to. Thanks again for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 04:53:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replacing-blanks-with-previous-count-in-continuous-line-chart/m-p/3900893#M152013</guid>
      <dc:creator>onedayover</dc:creator>
      <dc:date>2024-05-08T04:53:58Z</dc:date>
    </item>
  </channel>
</rss>

