<?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: Can someone explain this DADX measure? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-someone-explain-this-DADX-measure/m-p/997253#M12573</link>
    <description>&lt;P&gt;Nice explanation&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; got in there before me and with a more succinct answer than I had in my head&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Mar 2020 20:13:32 GMT</pubDate>
    <dc:creator>Chthonian</dc:creator>
    <dc:date>2020-03-29T20:13:32Z</dc:date>
    <item>
      <title>Can someone explain this DADX measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-someone-explain-this-DADX-measure/m-p/997201#M12571</link>
      <description>&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I am new to dax, and am having trouble trouble understanding this measure. Can someone who is familiar with dax break this down line by line and explain the code and functions? I feel it would be a great learning exercise for myself and perhaps others.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Actual =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR ACT = CALCULATE(SUM('COVID-19'[Cumulated]), LASTDATE('COVID-19'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR PD = CALCULATE(CALCULATE(SUM('COVID-19'[Cumulated]), LASTDATE('COVID-19'[Date])),PREVIOUSDAY(LASTDATE('COVID-19'[Date])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF (HASONEVALUE(TimeRange[Time Range]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SWITCH(VALUES(TimeRange[Time Range]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Cumulated", ACT,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"Daily", ACT - PD,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLANK()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ACT&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 29 Mar 2020 18:38:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-someone-explain-this-DADX-measure/m-p/997201#M12571</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-29T18:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this DADX measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-someone-explain-this-DADX-measure/m-p/997248#M12572</link>
      <description>Well that is some interesting code.&lt;BR /&gt;&lt;BR /&gt;ACT - Calculates the sum of the Cumulated column  in table COVID-19 within the context of the last date (latest date) within the Date column in the same COVID-19 table. So, looks like it is getting the last value from what is probably an accumulating total column.&lt;BR /&gt;&lt;BR /&gt;PD - So, they wrap the same calculation as above in another CALCULATE and tag in a filter context of PREVIOUSDAY from the last date so this is basically getting the next to the last day.&lt;BR /&gt;&lt;BR /&gt;In the RETURN statement, they check to see if a single value has been selected in the Time Range column in the TimeRange table. Probably a slicer. Maybe a disconnected table? If there is only one value, then it returns ACT variable.&lt;BR /&gt;&lt;BR /&gt;If that is not the case, it gets the distinct values that have been selected and here I am fairly sure it just returns BLANK or an error all the time as it is unclear to that you can compare a table to a string. I have tested this and you cannot.</description>
      <pubDate>Sun, 29 Mar 2020 20:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-someone-explain-this-DADX-measure/m-p/997248#M12572</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-29T20:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this DADX measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-someone-explain-this-DADX-measure/m-p/997253#M12573</link>
      <description>&lt;P&gt;Nice explanation&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; got in there before me and with a more succinct answer than I had in my head&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 20:13:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-someone-explain-this-DADX-measure/m-p/997253#M12573</guid>
      <dc:creator>Chthonian</dc:creator>
      <dc:date>2020-03-29T20:13:32Z</dc:date>
    </item>
  </channel>
</rss>

