<?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: Adding a value to 2 rows based on 1 row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-value-to-2-rows-based-on-1-row/m-p/2647277#M77902</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391634" data-lia-user-login="Viswajth_Nair95" class="lia-mention lia-mention-user"&gt;Viswajth_Nair95&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to sample file with the solution&amp;nbsp;&lt;A href="https://www.dropbox.com/t/87UNh6OAhZDbijhM" target="_blank"&gt;https://www.dropbox.com/t/87UNh6OAhZDbijhM&lt;/A&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;SD = 
IF (
    CALCULATE ( 
        SELECTEDVALUE ( EnergyConsumption[Energy] ),
        EnergyConsumption[EnergyType] = "Gas",
        ALLEXCEPT ( EnergyConsumption, EnergyConsumption[Date], EnergyConsumption[Time] )
    )
        &amp;lt; 3,
    1
)&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 19 Jul 2022 09:50:19 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-07-19T09:50:19Z</dc:date>
    <item>
      <title>Adding a value to 2 rows based on 1 row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-value-to-2-rows-based-on-1-row/m-p/2646656#M77879</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So, i have a table like this which has the energy consumption reading for different energy type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When there is a shutdown in the plant, the gas reading drops immediately, so whenever the gas reading is below 3, it indicates that there was a shutdown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i want to do is calculate the energy consumption when the machine was running, which means i have to subtract the Gas, Steam and Electricity reading during the shutdown from the total energy consumption of the day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, i want the SD value to be 1 for both steam and electricity at all the Date and Time instances when Gas is below 3 or SD is 1. And since i am new to PowerBI, i really dont have much idea on what to do to be honest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope the question is clear, and any help would be really really be helpful for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 06:43:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-value-to-2-rows-based-on-1-row/m-p/2646656#M77879</guid>
      <dc:creator>Viswajth_Nair95</dc:creator>
      <dc:date>2022-07-19T06:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a value to 2 rows based on 1 row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-value-to-2-rows-based-on-1-row/m-p/2647277#M77902</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391634" data-lia-user-login="Viswajth_Nair95" class="lia-mention lia-mention-user"&gt;Viswajth_Nair95&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to sample file with the solution&amp;nbsp;&lt;A href="https://www.dropbox.com/t/87UNh6OAhZDbijhM" target="_blank"&gt;https://www.dropbox.com/t/87UNh6OAhZDbijhM&lt;/A&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;SD = 
IF (
    CALCULATE ( 
        SELECTEDVALUE ( EnergyConsumption[Energy] ),
        EnergyConsumption[EnergyType] = "Gas",
        ALLEXCEPT ( EnergyConsumption, EnergyConsumption[Date], EnergyConsumption[Time] )
    )
        &amp;lt; 3,
    1
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 19 Jul 2022 09:50:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-value-to-2-rows-based-on-1-row/m-p/2647277#M77902</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-19T09:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a value to 2 rows based on 1 row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-value-to-2-rows-based-on-1-row/m-p/2647796#M77953</link>
      <description>&lt;P&gt;That worked like a charm, thank you so much for that&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 13:22:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-value-to-2-rows-based-on-1-row/m-p/2647796#M77953</guid>
      <dc:creator>Viswajth_Nair95</dc:creator>
      <dc:date>2022-07-19T13:22:48Z</dc:date>
    </item>
  </channel>
</rss>

