<?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 Compare with &amp;quot;where&amp;quot; and dateadd (same period last year) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-with-quot-where-quot-and-dateadd-same-period-last-year/m-p/2742443#M84331</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need assistant with creating a compare for values created this month with same period -1 year (last year)&lt;/P&gt;&lt;P&gt;- Im able to get the result when not using filters (where)&lt;/P&gt;&lt;P&gt;- Date columns exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Goal&lt;/P&gt;&lt;P&gt;Create a dashboard that presents rows that differs more then 20 % (+ or -) from same period last year&lt;/P&gt;&lt;P&gt;This report are to be used to compare the data before the invoicing process starts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need to compare (ex) the period Aug (08-22) with Aug (08-21)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The TSQL/ps1 would be like (simplified - do not laugh :))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$1 = Select _consumption where readingdate = Aug 2022 and quantitycodevalue = 'kvarh' and readingstatus = '2'&lt;/P&gt;&lt;P&gt;$2 = Select _consumption where readingdate = Aug 2021 and quantitycodevalue = 'kvarh' and readingstatus = '3'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if $1&amp;nbsp; $2 &amp;gt; Diff then 20 % of value of $1 = Display res&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(plz note that readingstatus differs (2 = Approved, 3 = Billed))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;erik&lt;/P&gt;</description>
    <pubDate>Fri, 02 Sep 2022 06:27:40 GMT</pubDate>
    <dc:creator>eriweste</dc:creator>
    <dc:date>2022-09-02T06:27:40Z</dc:date>
    <item>
      <title>Compare with "where" and dateadd (same period last year)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-with-quot-where-quot-and-dateadd-same-period-last-year/m-p/2742443#M84331</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need assistant with creating a compare for values created this month with same period -1 year (last year)&lt;/P&gt;&lt;P&gt;- Im able to get the result when not using filters (where)&lt;/P&gt;&lt;P&gt;- Date columns exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Goal&lt;/P&gt;&lt;P&gt;Create a dashboard that presents rows that differs more then 20 % (+ or -) from same period last year&lt;/P&gt;&lt;P&gt;This report are to be used to compare the data before the invoicing process starts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need to compare (ex) the period Aug (08-22) with Aug (08-21)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The TSQL/ps1 would be like (simplified - do not laugh :))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$1 = Select _consumption where readingdate = Aug 2022 and quantitycodevalue = 'kvarh' and readingstatus = '2'&lt;/P&gt;&lt;P&gt;$2 = Select _consumption where readingdate = Aug 2021 and quantitycodevalue = 'kvarh' and readingstatus = '3'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if $1&amp;nbsp; $2 &amp;gt; Diff then 20 % of value of $1 = Display res&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(plz note that readingstatus differs (2 = Approved, 3 = Billed))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;erik&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 06:27:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-with-quot-where-quot-and-dateadd-same-period-last-year/m-p/2742443#M84331</guid>
      <dc:creator>eriweste</dc:creator>
      <dc:date>2022-09-02T06:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Compare with "where" and dateadd (same period last year)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-with-quot-where-quot-and-dateadd-same-period-last-year/m-p/2742889#M84358</link>
      <description>&lt;P&gt;Have a look at this &lt;A href="https://www.daxpatterns.com/standard-time-related-calculations/#:~:text=same%20period%20last%20year%2C" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;pattern&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 08:33:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-with-quot-where-quot-and-dateadd-same-period-last-year/m-p/2742889#M84358</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-09-02T08:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Compare with "where" and dateadd (same period last year)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-with-quot-where-quot-and-dateadd-same-period-last-year/m-p/2742949#M84365</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. The DATE "issue" is handled (getting the correct period to compare)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Main issue is to correctly using the "where" perspective (filter), if not the SUM of all _consumptions are being presented. I need the individual rows to be compared (Kvarh, Hög, låg etc)&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 08:45:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-with-quot-where-quot-and-dateadd-same-period-last-year/m-p/2742949#M84365</guid>
      <dc:creator>eriweste</dc:creator>
      <dc:date>2022-09-02T08:45:47Z</dc:date>
    </item>
  </channel>
</rss>

