<?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: Distinct count considering last date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897927#M8149</link>
    <description>&lt;P&gt;Good morning everyone!&lt;/P&gt;&lt;P&gt;Dear Anonymous&lt;/LI-USER&gt;&amp;nbsp;, your answer solved my problem. Thank you for your attention and support!&lt;BR /&gt;If you are not ordering too much, I would like to post a status column comparing whether within each order all items have a delivery date. If EVERYONE owns, throw in this column the value "Done". If there is at least 01 blank date, throw the value "Open". The column would only have the possibility of these 02 values.&lt;BR /&gt;Since I'm new to DAX, I still don't know how to get an array from an order's product list and compare if any date is blank. I have no idea how to do this considering order by order.&lt;/P&gt;&lt;P&gt;Could you help me with this problem?&lt;BR /&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2020 11:30:04 GMT</pubDate>
    <dc:creator>montilla</dc:creator>
    <dc:date>2020-01-13T11:30:04Z</dc:date>
    <item>
      <title>Distinct count considering last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897295#M8126</link>
      <description>&lt;P&gt;Hello friends!&lt;BR /&gt;I have the following product sales facts table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Order&lt;/TD&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Delivery Date&lt;/TD&gt;&lt;TD&gt;cStatus&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Mouse&lt;/TD&gt;&lt;TD&gt;2019-12-01&lt;/TD&gt;&lt;TD&gt;Delayed Delivery&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Keyboard&lt;/TD&gt;&lt;TD&gt;2020-01-01&lt;/TD&gt;&lt;TD&gt;Delayed Delivery&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;CPU&lt;/TD&gt;&lt;TD&gt;2019-12-20&lt;/TD&gt;&lt;TD&gt;Delayed Delivery&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Using a count measure distinct by order number&lt;/SPAN&gt;, I get the total orders delivered. In this example, the measure would return the total of &lt;U&gt;&lt;STRONG&gt;02 orders&lt;/STRONG&gt;&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;However, by plotting this measure on an axis line chart by date, the chart shows in the period the total of &lt;STRONG&gt;03 orders&lt;/STRONG&gt; delivered using the same previous measure because &lt;STRONG&gt;1 order has deliveries on different dates&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I would like some help from you to know how to change this so that it shows in the graph the total of 02 orders, taking the largest date in the order that contains more than 01 delivery with different dates.&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;Appreciate!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below, the measure used:&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;mDelivered Orders = CALCULATE(DISTINCTCOUNT(FollowUp[Order]);USERELATIONSHIP(Calendar[Date];FollowUp[Delivery Date]);FollowUp[cStatus]="Delayed Delivery")&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Jan 2020 00:37:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897295#M8126</guid>
      <dc:creator>montilla</dc:creator>
      <dc:date>2020-01-13T00:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count considering last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897350#M8128</link>
      <description>&lt;P&gt;Up!&amp;nbsp;Someone?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 02:21:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897350#M8128</guid>
      <dc:creator>montilla</dc:creator>
      <dc:date>2020-01-13T02:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count considering last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897454#M8131</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="198499" data-lia-user-login="montilla" class="lia-mention lia-mention-user"&gt;montilla&lt;/a&gt;&amp;nbsp;Here is my approach.&lt;/P&gt;&lt;P&gt;First create a calculated column to get the max date per order.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = CALCULATE(MAX('FollowUp'[Delivery Date]),ALLEXCEPT('FollowUp','FollowUp'[Order]))&lt;/LI-CODE&gt;&lt;P&gt;Modify your measure. i.e. use new column in relationship instead of delivery dates.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(DISTINCTCOUNT(FollowUp[Order]),USERELATIONSHIP('Calendar'[Date],FollowUp[Column]),FollowUp[cStatus]="Delayed Delivery")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If it helps accept as solution.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 04:51:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897454#M8131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-13T04:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count considering last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897927#M8149</link>
      <description>&lt;P&gt;Good morning everyone!&lt;/P&gt;&lt;P&gt;Dear Anonymous&lt;/a&gt;&amp;nbsp;, your answer solved my problem. Thank you for your attention and support!&lt;BR /&gt;If you are not ordering too much, I would like to post a status column comparing whether within each order all items have a delivery date. If EVERYONE owns, throw in this column the value "Done". If there is at least 01 blank date, throw the value "Open". The column would only have the possibility of these 02 values.&lt;BR /&gt;Since I'm new to DAX, I still don't know how to get an array from an order's product list and compare if any date is blank. I have no idea how to do this considering order by order.&lt;/P&gt;&lt;P&gt;Could you help me with this problem?&lt;BR /&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 11:30:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897927#M8149</guid>
      <dc:creator>montilla</dc:creator>
      <dc:date>2020-01-13T11:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count considering last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897931#M8150</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="198499" data-lia-user-login="montilla" class="lia-mention lia-mention-user"&gt;montilla&lt;/a&gt;&amp;nbsp;There are ways to do it. Here is the one approach&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = 
VAR _order = CALCULATE(COUNT('Table'[Order]),ALLEXCEPT('Table','Table'[Order]))
VAR _date = CALCULATE(COUNT('Table'[Delivery Date]),ALLEXCEPT('Table','Table'[Order]))
RETURN IF((_order-_date)&amp;gt;0,"Open","Done")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 13 Jan 2020 11:42:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-count-considering-last-date/m-p/897931#M8150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-13T11:42:53Z</dc:date>
    </item>
  </channel>
</rss>

