<?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: WIP measure that counts on blanks in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3130514#M111366</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;Good Morning and thank you agian.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested the new measure out and it does not achive what i need.&lt;/P&gt;&lt;P&gt;However, I have made some adjustments to the original measure that you provided me with and have come up with this:&lt;/P&gt;&lt;LI-CODE lang="css"&gt;Count =
VAR CurrentDate =
    MAX('Date'[Date])
RETURN
    COUNTROWS(
        FILTER(
            'Table',
            'Table'[StartDate] &amp;lt;= CurrentDate
                &amp;amp;&amp;amp; (
                    ISBLANK('Table'[OutcomeDate])
                    || 'Table'[OutcomeDate] &amp;gt; CurrentDate
                )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to be doing what i need. However, I feel that the data model will need to to have the relationship that I have removed. is there a way to make sure that is included?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you again for your time&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2023 10:54:50 GMT</pubDate>
    <dc:creator>Ravenholm</dc:creator>
    <dc:date>2023-03-14T10:54:50Z</dc:date>
    <item>
      <title>WIP measure that counts on blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3128547#M111217</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;New to this so hoping i am posting in the correct area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been playing about with building a measure but not sure if what I am doing is possibe or if I would be best approaching it from another direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a model that has two tables in it, one is calendar that has all dates in it from 1900 to 2099. The other is a data table that has 3 columns in it 'Referance', 'AppDate' and 'OutcomeDate' (I will be adding more but these are the important fields for now).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Referance' is numerical, and all the Date fields are in the format of short date. The two tables are joined Many to One (many in the data to the one date in the calendar).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of how my data would exist inthe data table.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Referance&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;StartDate&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;OutcomeDate&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;02/02/1999&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;31/12/2000&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;02/02/1999&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;31/12/2000&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&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TD&gt;&lt;P&gt;01/01/2023&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;18&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/01/2023&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;19&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/01/2023&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/01/2023&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I want a measure that i can use in the y-axis of a chart that will be able to do the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If there is no&amp;nbsp;OutcomeDate then count it against all dates on and after its&amp;nbsp;StartDate&lt;/LI&gt;&lt;LI&gt;If there is an OutcomeDate then count it againt all days on and after its StartDate but not on or after the OutcomeDate&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The x-axis on the chart will be represented by the date from the linked calendar table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So using the example data if i was looking at each day in the weeks starting:&lt;/P&gt;&lt;P&gt;06/03/2023 - every day should have a count of 10 for the open cases&lt;/P&gt;&lt;P&gt;01/01/2023 - every day should have a count of 15 for the open cases and those not closed until the 28/01/2023&lt;/P&gt;&lt;P&gt;28/11/2022 - every day should have a count of 5 for the open cases from&amp;nbsp;02/02/1999&lt;/P&gt;&lt;P&gt;11/10/1999 - every day should have a count of 10 for all the cases opened on 02/02/1999&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for your time, I hope i have provided enough information to go. Would love for this to be a measure, but if i need to add something to the data table to enable this that is also possible.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 15:45:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3128547#M111217</guid>
      <dc:creator>Ravenholm</dc:creator>
      <dc:date>2023-03-13T15:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: WIP measure that counts on blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3128816#M111234</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="528703" data-lia-user-login="Ravenholm" class="lia-mention lia-mention-user"&gt;Ravenholm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please delete the relationship or deactivate it. Try thr following measure&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Count =&lt;BR /&gt;VAR CurrentDate =&lt;BR /&gt;MAX ( 'Date'[Date] )&lt;BR /&gt;RETURN&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[StartDate] &amp;lt;= CurrentDate&lt;BR /&gt;&amp;amp;&amp;amp; 'Table'[OutcomeDate] &amp;gt; CurrentDate&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 17:49:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3128816#M111234</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-13T17:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: WIP measure that counts on blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3129510#M111281</link>
      <description>&lt;P&gt;Good evening&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;thank you so much for taking the time to respond.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have put in to practice your suggestion but it does not yeild my desired result. what i am finding is that on my chart i will only have values returned against certain dates and not all date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Between 02/02/1999 and 30/12/2000 it returns a value of 5 against all dates, we know from the data the date returned should be 10.&lt;/P&gt;&lt;P&gt;In then returns no values beween 31/12/2000 and 31/12/2022.&lt;/P&gt;&lt;P&gt;It then starts to return values again on 01/01/2023 until 27/01/2023 with the value of 5 which again from the data we know to be incorrect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would also if possible like to retaint he link before the two table if that is possible with what I want to achive.&lt;/P&gt;&lt;P&gt;Any further help would be much appriciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 01:49:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3129510#M111281</guid>
      <dc:creator>Ravenholm</dc:creator>
      <dc:date>2023-03-14T01:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: WIP measure that counts on blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3129751#M111297</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="528703" data-lia-user-login="Ravenholm" class="lia-mention lia-mention-user"&gt;Ravenholm&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Oh! I missed one detail. Sorry for that&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count =
VAR CurrentDate =
    MAX ( 'Date'[Date] )
RETURN
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[StartDate] &amp;lt;= CurrentDate
                &amp;amp;&amp;amp; COALESCE ( 'Table'[OutcomeDate], DATE ( 2099, 12, 31 ) ) &amp;gt; CurrentDate
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 04:20:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3129751#M111297</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-14T04:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: WIP measure that counts on blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3130514#M111366</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;Good Morning and thank you agian.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested the new measure out and it does not achive what i need.&lt;/P&gt;&lt;P&gt;However, I have made some adjustments to the original measure that you provided me with and have come up with this:&lt;/P&gt;&lt;LI-CODE lang="css"&gt;Count =
VAR CurrentDate =
    MAX('Date'[Date])
RETURN
    COUNTROWS(
        FILTER(
            'Table',
            'Table'[StartDate] &amp;lt;= CurrentDate
                &amp;amp;&amp;amp; (
                    ISBLANK('Table'[OutcomeDate])
                    || 'Table'[OutcomeDate] &amp;gt; CurrentDate
                )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to be doing what i need. However, I feel that the data model will need to to have the relationship that I have removed. is there a way to make sure that is included?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you again for your time&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 10:54:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WIP-measure-that-counts-on-blanks/m-p/3130514#M111366</guid>
      <dc:creator>Ravenholm</dc:creator>
      <dc:date>2023-03-14T10:54:50Z</dc:date>
    </item>
  </channel>
</rss>

