<?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: Calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523149#M70454</link>
    <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try it. Thank you for your suggestion.&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2022 11:25:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-18T11:25:40Z</dc:date>
    <item>
      <title>Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522417#M70404</link>
      <description>&lt;P&gt;Hey Everyone. Please l want to find dax that can count the number of cycles of a battery for each component. For each component, a cycle corresponds to a period where the intensity has a cnstant sign and when the intensity changes sign, we go to another cycle. It is therefore necessary to make a calculated column which will identify the cycles of each component, how can l do that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for the suggestions.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;component&lt;/TD&gt;&lt;TD&gt;intensity&lt;/TD&gt;&lt;TD&gt;number of cycle&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;-2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;-3&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;En français:&lt;/P&gt;&lt;P&gt;je veux trouver une formule qui permet de compter le nombre de cycle d'une batterie pour chaque composant. Pour chaque composant &amp;nbsp;un cycle correspond à une période où l'intensité a un signe constant et lorsque l'intensité change de signe on passe à un autre cycle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;il faut donc faire une colonne calculée qui va repérer les cycles de chaque composant, comment je peux faire ça? Merci d'avance pour les propositions.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 07:23:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522417#M70404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T07:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522529#M70411</link>
      <description>&lt;P&gt;Hi Alexa,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do you have a dte column in this table ?&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 07:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522529#M70411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T07:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522592#M70417</link>
      <description>&lt;P&gt;yes l have a date column.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 08:15:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522592#M70417</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T08:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522596#M70418</link>
      <description>&lt;P&gt;And we can have many cycles in one day.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 08:16:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522596#M70418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T08:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522907#M70434</link>
      <description>&lt;P&gt;Bien galère le cas de figure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 09:34:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2522907#M70434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T09:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523053#M70446</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is a sample file with the solution&amp;nbsp;&lt;A href="https://we.tl/t-K6pFsGb1qn" target="_blank"&gt;https://we.tl/t-K6pFsGb1qn&lt;/A&gt;&lt;BR /&gt;It includes 2 calculated columns. The first check for change of sign (checks for new cycle)&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;New Cycle = 
VAR CurrentDate = Data[Date]
VAR CurrentComponentTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[component] ) )
VAR T1 = FILTER ( CurrentComponentTable, Data[Date] &amp;lt; CurrentDate )
VAR CurrentIntensity = Data[intensity]
VAR PreviousDate = MAXX ( T1 , Data[Date] )
VAR PreviousIntensity = MAXX ( FILTER ( T1, Data[Date] = PreviousDate ), Data[intensity] )
RETURN
    IF ( ISBLANK ( PreviousIntensity ) || PreviousIntensity * CurrentIntensity &amp;lt; 0, 1, 0 )&lt;/LI-CODE&gt;&lt;P&gt;The 2nd column is the cycle sequential&amp;nbsp;number&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;cycle # = 
VAR CurrentDate = Data[Date]
VAR CurrentComponentTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[component] ) )
VAR T1 = FILTER ( CurrentComponentTable, Data[Date] &amp;lt;= CurrentDate )
RETURN
    SUMX ( T1, [New Cycle] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 10:27:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523053#M70446</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-18T10:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523149#M70454</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try it. Thank you for your suggestion.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 11:25:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523149#M70454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T11:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523245#M70457</link>
      <description>&lt;P&gt;l don't know why but the second column display the total number of cycles of a day. What l want it's to display the evolution of cycle , for example seeing the 1st cycle then the 2nd then 3rd cycle ,not having the total number directly. is it possible?&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 11:59:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523245#M70457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T11:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523265#M70459</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It wirks in the file that I shared. Can share screenshots?&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 12:08:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523265#M70459</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-18T12:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523617#M70480</link>
      <description>&lt;P&gt;j'ai remplacé la colonne date par la colonne date et heure et ça a marché.&amp;nbsp; C'est parceque dans ton tableau pour une date tu as juste compté un cycle pour chaque composant.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Merci pour la formule&lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 14:24:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523617#M70480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T14:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523751#M70485</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes you are I forgot to mention that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 15:17:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2523751#M70485</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-18T15:17:11Z</dc:date>
    </item>
  </channel>
</rss>

