<?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: a measure or column calculated base on multiple condition in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2982180#M99993</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="440504" data-lia-user-login="reynold522" class="lia-mention lia-mention-user"&gt;reynold522&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the pattern is not that obvious. could you explain the logic behind?&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 15:16:53 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2022-12-21T15:16:53Z</dc:date>
    <item>
      <title>a measure or column calculated base on multiple condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2982149#M99989</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table like following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Battery Type&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Setup&lt;/TD&gt;&lt;TD&gt;Capacity&lt;/TD&gt;&lt;TD&gt;Threshold Capacity&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;100&lt;/TD&gt;&lt;TD&gt;80%*Capacity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;30%*Capacity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;10%*capacity&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;70&lt;/TD&gt;&lt;TD&gt;200%*capacity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;120%*capacity&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the column 1-3 are already exist, the forth column is the one that I would like to implement&lt;/P&gt;&lt;P&gt;the value calculated in forth coloumn will be depended on column 1-3, if condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what will be DAX code for this case?&lt;/P&gt;&lt;P&gt;I would like to use threshold to set alert,&amp;nbsp;is column or measure better for this case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:08:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2982149#M99989</guid>
      <dc:creator>reynold522</dc:creator>
      <dc:date>2022-12-21T15:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: a measure or column calculated base on multiple condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2982180#M99993</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="440504" data-lia-user-login="reynold522" class="lia-mention lia-mention-user"&gt;reynold522&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the pattern is not that obvious. could you explain the logic behind?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:16:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2982180#M99993</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-21T15:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: a measure or column calculated base on multiple condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2982196#M99995</link>
      <description>&lt;P&gt;Yeah, the threshold (unit capacity) is heavily depend on battery nominal capacity and type of battery as well as battery setup.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g., 1st row, if battery type is 1, setup is 1 and capacity is 100, then threshold according to our experimental results should set as 80%*capacity, in this row, capacity is 100, then the value should be 80&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:23:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2982196#M99995</guid>
      <dc:creator>reynold522</dc:creator>
      <dc:date>2022-12-21T15:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: a measure or column calculated base on multiple condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2991339#M100662</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="440504" data-lia-user-login="reynold522" class="lia-mention lia-mention-user"&gt;reynold522&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you to create a 'Threshold' table and then calculate based on it.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Create a calculated column in your capacity table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Threshold Capacity = 
VAR _Threshold =
    CALCULATE (
        SUM ( Threshold[Threshold] ),
        FILTER (
            Threshold,
            Threshold[Battery Type ] = EARLIER ( 'Table'[Battery Type ] )
                &amp;amp;&amp;amp; Threshold[Setup] = EARLIER ( 'Table'[Setup] )
        )
    )
RETURN
    'Table'[Capacity] * _Threshold&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 08:17:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/a-measure-or-column-calculated-base-on-multiple-condition/m-p/2991339#M100662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-28T08:17:16Z</dc:date>
    </item>
  </channel>
</rss>

