<?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: Measure with IF-else condition to choose another measure value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-IF-else-condition-to-choose-another-measure-value/m-p/945051#M10250</link>
    <description>&lt;P&gt;In your IF-statement there is no condition&lt;BR /&gt;&lt;SPAN&gt;IF(Isseries, Calc1, Calc2)&lt;/SPAN&gt; - what is the condition to verify in order to choose between calc1 or calc 2?&lt;/P&gt;&lt;P&gt;Look at your first if-statement&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(ISFILTERED(Table[Series])= "All" , True, False)&lt;/SPAN&gt; - here we have a condition, if Table&lt;SPAN&gt;[Series] is equal to "ALL" we put true, if not false.&lt;BR /&gt;The same logic must be in your first if-statement&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For instance :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(Isseries=True(), Calc1, Calc2)&amp;nbsp;&lt;BR /&gt;So if Isseries is true than return calc 1, if not calc2&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2020 12:11:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-24T12:11:43Z</dc:date>
    <item>
      <title>Measure with IF-else condition to choose another measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-IF-else-condition-to-choose-another-measure-value/m-p/944018#M10200</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here in my case, let us say the data is like this:&lt;/P&gt;&lt;P&gt;Series&amp;nbsp; &amp;nbsp; &amp;nbsp; Sales Amt&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1000&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1200&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1500&lt;/P&gt;&lt;P&gt;All&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3600&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need to calculate the total sales amount and share%. The total sales for series "All" depend on another measure X which calculates the sum of sales on another "segment" column filter when Segment = "All segments". The expectation for total sales is like this:&lt;/P&gt;&lt;P&gt;Series&amp;nbsp; &amp;nbsp; &amp;nbsp; Sales Amt&amp;nbsp; &amp;nbsp; Total Sales&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3600&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3600&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1500&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3600&lt;/P&gt;&lt;P&gt;All&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3600&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, for all other series, the total sales should be equal to the sales amt of "All" and for the series "All" the total sales are equal to the total sales when segment = "All segment". I have created two measures, Measure1&amp;nbsp; which gives me total sales as 3600 for all series and another measure Measure 2 which gives total sales&amp;nbsp;when segment = "All segment".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a third measure for getting the desired value like the above table:&lt;/P&gt;&lt;P&gt;VAR IsSeries = IF(ISFILTERED(Table[Series])= "All" , True, False)&lt;BR /&gt;VAR Calc1 = [Measure 2]&lt;BR /&gt;VAR Calc2= [Measure 1]&lt;BR /&gt;Return IF(Isseries, Calc1, Calc2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting an error. kindly help how can write a conditional statement in measure to get the output correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 07:28:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-IF-else-condition-to-choose-another-measure-value/m-p/944018#M10200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-23T07:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with IF-else condition to choose another measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-IF-else-condition-to-choose-another-measure-value/m-p/944153#M10209</link>
      <description>The description of the problem is about as clear as mud. No wonder nobody has written anything for 7 hours... Either you'll explain clearly what it is you want or you'll be waiting until the end of the world.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Sun, 23 Feb 2020 14:39:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-IF-else-condition-to-choose-another-measure-value/m-p/944153#M10209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-23T14:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with IF-else condition to choose another measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-IF-else-condition-to-choose-another-measure-value/m-p/945051#M10250</link>
      <description>&lt;P&gt;In your IF-statement there is no condition&lt;BR /&gt;&lt;SPAN&gt;IF(Isseries, Calc1, Calc2)&lt;/SPAN&gt; - what is the condition to verify in order to choose between calc1 or calc 2?&lt;/P&gt;&lt;P&gt;Look at your first if-statement&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(ISFILTERED(Table[Series])= "All" , True, False)&lt;/SPAN&gt; - here we have a condition, if Table&lt;SPAN&gt;[Series] is equal to "ALL" we put true, if not false.&lt;BR /&gt;The same logic must be in your first if-statement&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For instance :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(Isseries=True(), Calc1, Calc2)&amp;nbsp;&lt;BR /&gt;So if Isseries is true than return calc 1, if not calc2&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 12:11:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-IF-else-condition-to-choose-another-measure-value/m-p/945051#M10250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-24T12:11:43Z</dc:date>
    </item>
  </channel>
</rss>

