<?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: DAX Query: Relative difference visible previous day in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-Relative-difference-visible-previous-day/m-p/3458529#M131864</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the OFFSET function.&lt;/P&gt;
&lt;P&gt;Here is an example:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Test =
VAR SummarizedTable =
    SUMMARIZE (
        'Table Principale',
        [Date Commande],
        "Somme Cash-Flow", SUM ( 'Table Principale'[Prix total avec rabais] )
    )
VAR AddPrevious =
    ADDCOLUMNS (
        SummarizedTable,
        "Somme Cash-Flow Previous",
            -- Guaranteed to be a single row
            SELECTCOLUMNS (
                OFFSET ( -1, SummarizedTable, ORDERBY ( 'Table Principale'[Date Commande] ) ),
                [Somme Cash-Flow]
            )
    )
RETURN
    AddPrevious&lt;/LI-CODE&gt;
&lt;P&gt;I would also recommend changing SUMMARIZE (...) to ADDCOLUMNS ( SUMMARIZE (... ), ... ), but that's a best practice suggestion rather than a necessity here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2023 00:24:03 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2023-10-04T00:24:03Z</dc:date>
    <item>
      <title>DAX Query: Relative difference visible previous day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-Relative-difference-visible-previous-day/m-p/3458236#M131844</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following query table yet (i'm not interested in a Table or Matrix visual):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i get a new column with the relative difference of one of the visible day with the previous visible day?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 19:10:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-Relative-difference-visible-previous-day/m-p/3458236#M131844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-03T19:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query: Relative difference visible previous day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-Relative-difference-visible-previous-day/m-p/3458529#M131864</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the OFFSET function.&lt;/P&gt;
&lt;P&gt;Here is an example:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Test =
VAR SummarizedTable =
    SUMMARIZE (
        'Table Principale',
        [Date Commande],
        "Somme Cash-Flow", SUM ( 'Table Principale'[Prix total avec rabais] )
    )
VAR AddPrevious =
    ADDCOLUMNS (
        SummarizedTable,
        "Somme Cash-Flow Previous",
            -- Guaranteed to be a single row
            SELECTCOLUMNS (
                OFFSET ( -1, SummarizedTable, ORDERBY ( 'Table Principale'[Date Commande] ) ),
                [Somme Cash-Flow]
            )
    )
RETURN
    AddPrevious&lt;/LI-CODE&gt;
&lt;P&gt;I would also recommend changing SUMMARIZE (...) to ADDCOLUMNS ( SUMMARIZE (... ), ... ), but that's a best practice suggestion rather than a necessity here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 00:24:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-Relative-difference-visible-previous-day/m-p/3458529#M131864</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-10-04T00:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query: Relative difference visible previous day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-Relative-difference-visible-previous-day/m-p/3458877#M131889</link>
      <description>&lt;P&gt;Thanks a lot! That works like a charm.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 06:41:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-Relative-difference-visible-previous-day/m-p/3458877#M131889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-04T06:41:18Z</dc:date>
    </item>
  </channel>
</rss>

