<?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 IF ELSE in DAX Measure using only Dimensions causes error in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605433#M32221</link>
    <description>&lt;P&gt;Hi Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a report connected to a Power BI dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building a Table visual,I am using one fact from Fact Table and there are other dimension values coming from different dimension tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 2 dates coming from 2 different dimesnions (in the table visual). I am trying to compare if Dim1.Date &amp;lt; Dim2.Date then give 1 else 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written 2 measures to get the 2 dates&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateFrom Dim1 =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(MAXX('FactTable',MAX('Dim1'[Date])),'FactTable')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DateFrom Dim2 =&amp;nbsp;CALCULATE(MAXX('FactTable',MAX('Dim2'[Date])),'FactTable')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When I use these 2 measures in the visual they return the corresponding dates for each row correctly.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I need to compare these 2 measures (these 2 dates).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I write a measure&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DatesCompare = IF(DateFrom Dim1 &amp;lt;&amp;nbsp;DateFrom Dim2,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It works perfect with only TRUE condition but when I include the ELSE condition in the measure i.e 0 and use it in the visual it keeps on loading and causes error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can anyone help me with the DAX for it and why including the ELSE condition causes error?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 18 Jan 2021 10:12:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-01-18T10:12:04Z</dc:date>
    <item>
      <title>IF ELSE in DAX Measure using only Dimensions causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605433#M32221</link>
      <description>&lt;P&gt;Hi Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a report connected to a Power BI dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building a Table visual,I am using one fact from Fact Table and there are other dimension values coming from different dimension tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 2 dates coming from 2 different dimesnions (in the table visual). I am trying to compare if Dim1.Date &amp;lt; Dim2.Date then give 1 else 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written 2 measures to get the 2 dates&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateFrom Dim1 =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(MAXX('FactTable',MAX('Dim1'[Date])),'FactTable')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DateFrom Dim2 =&amp;nbsp;CALCULATE(MAXX('FactTable',MAX('Dim2'[Date])),'FactTable')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When I use these 2 measures in the visual they return the corresponding dates for each row correctly.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I need to compare these 2 measures (these 2 dates).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I write a measure&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DatesCompare = IF(DateFrom Dim1 &amp;lt;&amp;nbsp;DateFrom Dim2,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It works perfect with only TRUE condition but when I include the ELSE condition in the measure i.e 0 and use it in the visual it keeps on loading and causes error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can anyone help me with the DAX for it and why including the ELSE condition causes error?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Jan 2021 10:12:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605433#M32221</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-18T10:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE in DAX Measure using only Dimensions causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605535#M32222</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;I've created the same measure and tried but it works fine.&lt;BR /&gt;Can you share some data and visuals where you're using the above measures?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 10:57:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605535#M32222</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-18T10:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE in DAX Measure using only Dimensions causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605543#M32223</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot share data since its company specific and also is a Live connection to a Power BI dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Along with the 2 dates from 2 dimension tables and these 3 measures there are other dimensions getting used in the Table visual.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 11:04:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605543#M32223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-18T11:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE in DAX Measure using only Dimensions causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605666#M32224</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , if Dim1 and dim2 are joined these two should work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MAXX(allselected('Dim1'),'Dim1'[Date])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MAXX(allselected('Dim2'),'Dim2'[Date])&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 12:08:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE-in-DAX-Measure-using-only-Dimensions-causes-error/m-p/1605666#M32224</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-01-18T12:08:41Z</dc:date>
    </item>
  </channel>
</rss>

