<?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: How to return 0, if criteria are not met in a measure, but for a specific period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718928#M144792</link>
    <description>&lt;P&gt;Yes, I have already try this and it didn't change anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;it return me the same graphic. And if I remove&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IF ( Last7DaysCount &amp;gt; 0, Last7DaysCount, 0 )&lt;/PRE&gt;&lt;P&gt;I can't have 0 for the blank() date. So it is not working.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2024 06:25:58 GMT</pubDate>
    <dc:creator>game1</dc:creator>
    <dc:date>2024-02-23T06:25:58Z</dc:date>
    <item>
      <title>How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3717970#M144755</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to return 0, if criteria are not met in a measure, but for a specific period.&lt;/P&gt;&lt;P&gt;For example, I have try this, but it still not giving me the measure for the last 7 days, because I want that if for example in a specific date (Table[date]) there is not a person to be count, it must return me 0. So what it does is that it return me 0 but for all the months, not just for the last 7 days. :&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR Last7DaysCount =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNT(Table[Persons]),&lt;BR /&gt;FILTER(&lt;BR /&gt;Table,&lt;BR /&gt;Table[Date] &amp;gt;= TODAY() - 6 &amp;amp;&amp;amp; Table[Date] &amp;lt;= TODAY()&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(Last7DaysCount &amp;gt; 0, Last7DaysCount, 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 18:50:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3717970#M144755</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-22T18:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3717997#M144756</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Not sure If I understood your question, please try:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR __Today = TODAY ()
VAR __LastSevenDays = TODAY ()-6
VAR Last7DaysCount =
    CALCULATE (
        COUNT ( Table[Persons] ),
        Table[Date] &amp;gt;= __LastSevenDays
        Table[Date] &amp;lt;= __Today 
    )
RETURN
    IF ( Last7DaysCount &amp;gt; 0, Last7DaysCount, 0 )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 19:05:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3717997#M144756</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-02-22T19:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3717999#M144757</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I worked with the following DAX. It worked.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Last 7 Days Count =&lt;BR /&gt;VAR last7Days =&lt;BR /&gt;FILTER ( ALL ( Person ),&lt;BR /&gt;Person[Date] &amp;gt;= TODAY () - 6 &amp;amp;&amp;amp; Person[Date] &amp;lt;= TODAY ()&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF ( CALCULATE ( COUNTROWS ( last7Days ), VALUES ( Person[Date] ) ) = BLANK (),&lt;BR /&gt;0,&lt;BR /&gt;CALCULATE ( COUNTROWS ( last7Days ), VALUES ( Person[Date] ) )&lt;BR /&gt;)&lt;/PRE&gt;&lt;DIV&gt;I created the table name "Person".&lt;/DIV&gt;&lt;DIV&gt;Please try this solution and let me know if any issues with it.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Rushika&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Feb 2024 19:41:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3717999#M144757</guid>
      <dc:creator>rushikale01</dc:creator>
      <dc:date>2024-02-22T19:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718048#M144762</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;exactly, I have already try that, but it is not giving me for the specify period of the last 7 days. It take all the month in january, I would 0 0 0 0... but it is not the period of the last 7 days.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 19:28:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718048#M144762</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-22T19:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718050#M144763</link>
      <description>&lt;P&gt;I just want it to return the me the period of the last 7 days and put 0 want the date is blank. But what it does is that it put 0 also for january, march,.....&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 19:30:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718050#M144763</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-22T19:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718232#M144770</link>
      <description>&lt;P&gt;I have try this, but it give me 0 for the other months and day, but I only want for the specific period of the last 7 days, so it should only be 7 dates at the axis X.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 21:33:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718232#M144770</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-22T21:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718396#M144778</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have add clarification ( see above).&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 23:55:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718396#M144778</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-22T23:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718783#M144786</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, if possible, when you create the line chart for last 7 days period then filter the line chart with relative date filter with respect to last 7 days. So everyday it will show you the line chart only specific with last 7 days of data only.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 04:55:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718783#M144786</guid>
      <dc:creator>rushikale01</dc:creator>
      <dc:date>2024-02-23T04:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718928#M144792</link>
      <description>&lt;P&gt;Yes, I have already try this and it didn't change anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;it return me the same graphic. And if I remove&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IF ( Last7DaysCount &amp;gt; 0, Last7DaysCount, 0 )&lt;/PRE&gt;&lt;P&gt;I can't have 0 for the blank() date. So it is not working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 06:25:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3718928#M144792</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-23T06:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3719237#M144808</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Base on your sample data, could you please provide your expected result? What will you want to display in the line chart? For example: Today(2024-2-23)&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If there is no person from 2023-2-16 to today,&amp;nbsp; it will be &lt;FONT color="#FF0000"&gt;0&lt;/FONT&gt; for these dates. The other dates display the corresponding count?&lt;/LI&gt;
&lt;LI&gt;If there are some person from 2023-2-16 to today(there are &lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt; person in your sample data in last 7 days),&amp;nbsp;it display the corresponding count for all dates?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 08:29:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3719237#M144808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-23T08:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3719879#M144835</link>
      <description>&lt;P&gt;1-If there is no person from 2023-2-17 to today-&lt;SPAN&gt;&lt;EM&gt;Today(2024-2-23)&lt;/EM&gt;&lt;/SPAN&gt;, it will be &lt;FONT color="#FF0000"&gt;0&lt;/FONT&gt; for these dates. The other dates display the corresponding count? &lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2-If there are some person from 2023-2-17 to today, it display it.&lt;/P&gt;&lt;P&gt;(there are &lt;STRONG&gt;17(8+9)&lt;/STRONG&gt;&amp;nbsp;person in last 7 days for 2023-2-19.&lt;/P&gt;&lt;P&gt;3-And the other dates from 2023-2-17 to today, must be 0., except for&amp;nbsp;2023-2-19.&lt;/P&gt;&lt;P&gt;4-In this image, what is in red must not appear.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 13:28:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3719879#M144835</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-23T13:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722146#M144960</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still stuck with this problem. I've tried several options, but it doesn't seem to work.&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 18:26:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722146#M144960</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-25T18:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722209#M144962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After using the measure that gives you zeroes for dates outside of your range, you could add a column to your Date table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This will include ALL dates in your table but can easily be changed&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__Include (CC) = 
VAR _Oldest =
    MINX(
        ALL( 'TableP'[Date] ),
        'TableP'[Date]
    )
VAR _Newest =
    MAXX(
        ALL( 'TableP'[Date] ),
        'TableP'[Date]
    )
VAR _Result = 
    IF(
        [Date] &amp;gt;= _Oldest
            &amp;amp;&amp;amp; [Date] &amp;lt;= _Newest,
        1,
        0
    )
RETURN
    _Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you could write a measure like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__Include (measure) = 
VAR _Curr = SELECTEDVALUE( 'Date'[Date] )
VAR _Oldest =
    MINX(
        ALL( 'TableP'[Date] ),
        'TableP'[Date]
    )
VAR _Newest =
    MAXX(
        ALL( 'TableP'[Date] ),
        'TableP'[Date]
    )
VAR _Result = 
    IF(
        _Curr &amp;gt;= _Oldest
            &amp;amp;&amp;amp; _Curr &amp;lt;= _Newest,
        1,
        0
    )
RETURN
    _Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In either case, you can filter your visual using the __Include (CC) = 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculated column is the easiest (for PBI) since it is only calculated during refresh.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&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>Sun, 25 Feb 2024 19:58:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722209#M144962</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2024-02-25T19:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722228#M144963</link>
      <description>&lt;P&gt;After re-reading (and looking at your chart), I would use a calculated column in your date table like this&amp;nbsp;&amp;nbsp;and use that for filtering that chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__Include 7 Days (CC) = 
    IF(
        [Date] &amp;gt;= TODAY() - 6
            &amp;amp;&amp;amp; [Date] &amp;lt;= TODAY(),
        1,
        0
    )&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;( My earlier post is a more generic filter that I use regularly. )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 21:08:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722228#M144963</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2024-02-25T21:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722465#M144973</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, it return me the same result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, thanks for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 01:47:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3722465#M144973</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-26T01:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3723497#M145003</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please &lt;STRONG&gt;update&lt;/STRONG&gt; the formula of measure as below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measurex =
VAR _seldate =
    SELECTEDVALUE ( 'Date'[Date] )
VAR Last7DaysCount =
    CALCULATE (
        COUNT ( Table[Persons] ),
        FILTER ( Table, Table[Date] &amp;gt;= TODAY () - 6 &amp;amp;&amp;amp; Table[Date] &amp;lt;= TODAY () )
    )
RETURN
    IF (
        _seldate
            &amp;gt;= TODAY () - 6
            &amp;amp;&amp;amp; _seldate &amp;lt;= TODAY (),
        IF ( Last7DaysCount &amp;gt; 0, Last7DaysCount, 0 ),
        BLANK ()
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;If the above ones can't help you get the expected result, please provide some&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in your table&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;) with&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with special examples and screenshots.Y&lt;/SPAN&gt;&lt;SPAN&gt;ou can refer the following link to share the required info:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7CClaire.Dong%40microsoft.com%7Cada9149bd91546a8432508dacd31ef9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638047911607737134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=EJlYfclgtrjgAEYj9Uo1AauqxaQm3hlQsjJMo4zCY1M%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 09:52:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3723497#M145003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-26T09:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3725353#M145101</link>
      <description>&lt;P&gt;It gave me this graph.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But, what I want is this one:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 00:09:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3725353#M145101</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-02-27T00:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to return 0, if criteria are not met in a measure, but for a specific period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3735904#M145615</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample pbix file(see &lt;STRONG&gt;the attachment&lt;/STRONG&gt;), please check if that is what you want.&lt;/P&gt;
&lt;P&gt;1. Create a date dimension table&lt;/P&gt;
&lt;P&gt;2. &lt;STRONG&gt;Update&lt;/STRONG&gt; the formula of measure as below&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _today =
    TODAY () - 4
VAR _seldate =
    SELECTEDVALUE ( 'Date'[Date] )
VAR Last7DaysCount =
    CALCULATE (
        COUNT ( 'Table'[Person] ),
        FILTER ( 'Table', 'Table'[Date] = _seldate )
    )
RETURN
    IF (
        _seldate &amp;gt;= _today - 6
            &amp;amp;&amp;amp; _seldate &amp;lt;= _today,
        IF ( Last7DaysCount &amp;gt; 0, Last7DaysCount, 0 ),
        BLANK ()
    )&lt;/LI-CODE&gt;
&lt;P&gt;3. Create a line chart visual (&lt;STRONG&gt;X-axis:&lt;/STRONG&gt; [Date] field of date dimension table &lt;STRONG&gt;Y-axis:&lt;/STRONG&gt; [Measure])&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 09:00:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-return-0-if-criteria-are-not-met-in-a-measure-but-for-a/m-p/3735904#M145615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-01T09:00:21Z</dc:date>
    </item>
  </channel>
</rss>

