<?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: Compare value in dimension table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2502332#M69201</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;MyMeasure =
CALCULATE (
    SELECTEDVALUE ( DIM[ColumnToShow] ),
    CROSSFILTER ( DIM[KeyColumn], FACT[KeyColumn], BOTH )
) &amp;gt; 2&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 09 May 2022 14:25:42 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-05-09T14:25:42Z</dc:date>
    <item>
      <title>Compare value in dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2502030#M69184</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a pretty standard datamodel that consists of a fact table and several dimension tables, all many-to-one relationships, unidirectional towards the fact table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the dimension table (DIM) there is value X that represents a certain number. I would like to create a measure (instead of a calculated column) that returns true or false based on whether the value is bigger than e.g. 2. This measure will be used in a table that has the key column of the fact table (FACT), and some of the columns in DIM.&lt;/P&gt;&lt;P&gt;I might be overthinking, but I can't get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought I could just use a lookupvalue like so:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MEASURENAME = LOOKUPVALUE(DIM[ColumnToShow], DIM[KeyColumn], SELECTEDVALUE(FACT[KeyColumn]) &amp;gt; 2&lt;/LI-CODE&gt;&lt;P&gt;, but the table just keeps loading and ends up failing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I forgetting here?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 12:42:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2502030#M69184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-09T12:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compare value in dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2502332#M69201</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;MyMeasure =
CALCULATE (
    SELECTEDVALUE ( DIM[ColumnToShow] ),
    CROSSFILTER ( DIM[KeyColumn], FACT[KeyColumn], BOTH )
) &amp;gt; 2&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 09 May 2022 14:25:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2502332#M69201</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-09T14:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compare value in dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2504070#M69292</link>
      <description>&lt;P&gt;Hi, thanks!&lt;/P&gt;&lt;P&gt;The calculate-part returns the correct value, but once I add the '&amp;gt;2' part, the whole table blows up and shows all possible combinations from both the fact and dimension tables.&lt;/P&gt;&lt;P&gt;Any suggestions on that?&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 08:39:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2504070#M69292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-10T08:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compare value in dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2505223#M69346</link>
      <description>&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MyMeasure =
IF (
    CALCULATE (
        SELECTEDVALUE ( DIM[ColumnToShow] ),
        CROSSFILTER ( DIM[KeyColumn], FACT[KeyColumn], BOTH )
    ) &amp;gt; 2,
    1
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 May 2022 14:42:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2505223#M69346</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-10T14:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Compare value in dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2506806#M69435</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This seems to work, thanks. The thing is, it only shows values for which the evaluation is true. I tried adding an alternative value (so IF( [...], 1, 0)), but that immediately made the table show every possible combination again. I am familiar with row context, but I can't figure out why this behaviour would be present, and how to deal with it.&lt;/P&gt;&lt;P&gt;I can't imagine calculated columns would be the only option here right..?&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 07:22:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2506806#M69435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-11T07:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Compare value in dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2507033#M69442</link>
      <description>&lt;P&gt;Hi Eric&lt;/P&gt;&lt;P&gt;If you have other measure in the table/matrix visual you should see balnks wehereever the condition is false. Just make sure measure in filter pane is set to ALL.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 08:22:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2507033#M69442</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-11T08:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Compare value in dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2507034#M69443</link>
      <description>&lt;P&gt;Hi Eric&lt;/P&gt;&lt;P&gt;If you have other measure in the table/matrix visual you should see balnks wehereever the condition is false. Just make sure measure in filter pane is set to ALL.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 08:22:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-value-in-dimension-table/m-p/2507034#M69443</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-11T08:22:27Z</dc:date>
    </item>
  </channel>
</rss>

