<?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: [SSAS] Measure := IF [column1] = &amp;quot;ABCD&amp;quot; then DIVIDE()... else... DIVIDE() in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786878#M4352</link>
    <description>&lt;P&gt;The selectedvalue() has perhaps a bit misleading name, but these two expressions are&amp;nbsp; equivalent&lt;/P&gt;&lt;PRE&gt;SELECTEDVALUE( &amp;lt;columnName&amp;gt;, &amp;lt;alternateResult&amp;gt;)&lt;/PRE&gt;&lt;PRE&gt;IF(HASONEVALUE(&amp;lt;columnName&amp;gt;), VALUES(&amp;lt;columnName&amp;gt;), &amp;lt;alternateResult&amp;gt;)&lt;/PRE&gt;&lt;P&gt;If the filter context has narrowed the values in the column down one unique value, this value is returned, otherwise a blank or alternative value is returned: &lt;A href="https://dax.guide/selectedvalue/" target="_self"&gt;https://dax.guide/selectedvalue/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If column 1 is a flag value, and not something you will add in a report the SUMX-version is probably what will give you what you need.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2019 08:20:35 GMT</pubDate>
    <dc:creator>sturlaws</dc:creator>
    <dc:date>2019-09-09T08:20:35Z</dc:date>
    <item>
      <title>[SSAS] Measure := IF [column1] = "ABCD" then DIVIDE()... else... DIVIDE()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786152#M4321</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;I have a IF condition that I need to replicate in DAX measure. It looks like that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure := IF [column1] = 'Y' then DIVIDE(sum([col2),sum(col2)+sum(col3)) else DIVIDE(sum([col2]),sum[col2]).&lt;/P&gt;&lt;P&gt;Else condition of course can be hardcoded as "1" but that's not a main issue here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As we know, DAX measures can't use IFs based on Columns in the model/data so what would be the best way of implementing this in DAX measure(!) [this is important as I'm working with SSAS not PBI]?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 08:02:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786152#M4321</guid>
      <dc:creator>Glaeran</dc:creator>
      <dc:date>2019-09-07T08:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: [SSAS] Measure := IF [column1] = "ABCD" then DIVIDE()... else... DIVIDE()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786182#M4322</link>
      <description>&lt;P&gt;Depends on your need.&lt;BR /&gt;&lt;BR /&gt;If you have column1 on axis or slicers you can do this:&lt;BR /&gt;measure = if(selectedvalue(Table[column1])="Y";......&lt;BR /&gt;&lt;BR /&gt;If&amp;nbsp; you want to have the sum across all values in column, but with different calculations for them you can try this&lt;BR /&gt;measure = sumx(table,if(selectedvalue(Table[column1])=1;....)&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 12:45:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786182#M4322</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2019-09-07T12:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: [SSAS] Measure := IF [column1] = "ABCD" then DIVIDE()... else... DIVIDE()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786463#M4340</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="88633" data-lia-user-login="sturlaws" class="lia-mention lia-mention-user"&gt;sturlaws&lt;/a&gt;, thanks. Column1 is more of used as flag column and is not used later in the report/filters/is vislble to users at all.&lt;/P&gt;&lt;P&gt;So not sure whether selectedvalue() will be proper here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 16:35:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786463#M4340</guid>
      <dc:creator>Glaeran</dc:creator>
      <dc:date>2019-09-08T16:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: [SSAS] Measure := IF [column1] = "ABCD" then DIVIDE()... else... DIVIDE()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786878#M4352</link>
      <description>&lt;P&gt;The selectedvalue() has perhaps a bit misleading name, but these two expressions are&amp;nbsp; equivalent&lt;/P&gt;&lt;PRE&gt;SELECTEDVALUE( &amp;lt;columnName&amp;gt;, &amp;lt;alternateResult&amp;gt;)&lt;/PRE&gt;&lt;PRE&gt;IF(HASONEVALUE(&amp;lt;columnName&amp;gt;), VALUES(&amp;lt;columnName&amp;gt;), &amp;lt;alternateResult&amp;gt;)&lt;/PRE&gt;&lt;P&gt;If the filter context has narrowed the values in the column down one unique value, this value is returned, otherwise a blank or alternative value is returned: &lt;A href="https://dax.guide/selectedvalue/" target="_self"&gt;https://dax.guide/selectedvalue/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If column 1 is a flag value, and not something you will add in a report the SUMX-version is probably what will give you what you need.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 08:20:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SSAS-Measure-IF-column1-quot-ABCD-quot-then-DIVIDE-else-DIVIDE/m-p/786878#M4352</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2019-09-09T08:20:35Z</dc:date>
    </item>
  </channel>
</rss>

