<?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: Add two values from a calculated inline DAX table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-two-values-from-a-calculated-inline-DAX-table/m-p/1467699#M27812</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can add up the values using an iterator like sum from a virtual table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR TOTAL = SUMX(CALC_TBL_TOP1, [DAY]) + SUMX(CALC_TBL_TOP1,[END_HOUR])&lt;/LI-CODE&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Nov 2020 11:20:40 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2020-11-01T11:20:40Z</dc:date>
    <item>
      <title>Add two values from a calculated inline DAX table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-two-values-from-a-calculated-inline-DAX-table/m-p/1467668#M27811</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to add two values&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EVALUATE
VAR CRT_DATE =
    DATEVALUE ( "30/10/2020" )
VAR HOURS_SLA = 36
VAR CALC_TBL=
    FILTER(
        ADDCOLUMNS (
            CALCULATETABLE ( Slots, Slots[DAY] &amp;gt;= CRT_DATE ),
            "RUNNING HOURS",
                VAR LIN_DATE = Slots[DAY]
                RETURN
                    CALCULATE (
                        SUM ( Slots[HOURS] ),
                        Slots[DAY] &amp;gt;= CRT_DATE,
                        Slots[DAY] &amp;lt;= LIN_DATE
                    )
        ),
        [RUNNING HOURS] &amp;gt;= HOURS_SLA
    )
VAR CALC_TBL_TOP1=TOPN(1,CALC_TBL)
RETURN CALC_TBL_TOP1[DAY]+CALC_TBL_TOP1[END_HOUR]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the hardest part is done, now i just need to sum up column [DAY] and [END_HOUR]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to use SUM, SUMX, VALUE, VALUES, SELECTCOLUMNS. I actually just solved it in dax studio after writing half&amp;nbsp;of the post, so I will post anyway with my solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR DIA= SELECTCOLUMNS(CALC_TBL_TOP1,"DAY",[DAY])
VAR HORA= SELECTCOLUMNS(CALC_TBL_TOP1,"HOUR",[END_HOUR])
RETURN {DIA+HORA}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way than selectcolumns?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;João&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 10:59:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-two-values-from-a-calculated-inline-DAX-table/m-p/1467668#M27811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-01T10:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add two values from a calculated inline DAX table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-two-values-from-a-calculated-inline-DAX-table/m-p/1467699#M27812</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can add up the values using an iterator like sum from a virtual table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR TOTAL = SUMX(CALC_TBL_TOP1, [DAY]) + SUMX(CALC_TBL_TOP1,[END_HOUR])&lt;/LI-CODE&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 11:20:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-two-values-from-a-calculated-inline-DAX-table/m-p/1467699#M27812</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-11-01T11:20:40Z</dc:date>
    </item>
  </channel>
</rss>

