<?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: Override measure result if before certain date in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Override-measure-result-if-before-certain-date/m-p/2383923#M856478</link>
    <description>&lt;P&gt;Replacing the Values function with SelectedValue ended up doing the trick!&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 16:19:30 GMT</pubDate>
    <dc:creator>markmess77</dc:creator>
    <dc:date>2022-03-09T16:19:30Z</dc:date>
    <item>
      <title>Override measure result if before certain date</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Override-measure-result-if-before-certain-date/m-p/2383909#M856473</link>
      <description>&lt;P&gt;I have a simple measure that I am trying to expand upon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
    DISTINCTCOUNT ( Table[ColumnName] ),
    Table[AnotherColumn] == "Category"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am then using that measure in a matrix where the rows are dates. However, I want to override the result of the measure to 0 if the year is equal to or before the year 2020. I tried to implement that logic to the measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
    IF (
        VALUES ( Calendar[Year] ) &amp;lt;= 2020,
        0,
        DISTINCTCOUNT ( Table[ColumnName] ),
    ),
    Table[AnotherColumn] == "Category"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The limitation here seems to be the VALUES function as it seems to return multiple values and the visual is expecting a single value. I've been looking through the DAX documentation for a better function that fits my needs, but have not had any luck so far.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 16:14:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Override-measure-result-if-before-certain-date/m-p/2383909#M856473</guid>
      <dc:creator>markmess77</dc:creator>
      <dc:date>2022-03-09T16:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Override measure result if before certain date</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Override-measure-result-if-before-certain-date/m-p/2383923#M856478</link>
      <description>&lt;P&gt;Replacing the Values function with SelectedValue ended up doing the trick!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 16:19:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Override-measure-result-if-before-certain-date/m-p/2383923#M856478</guid>
      <dc:creator>markmess77</dc:creator>
      <dc:date>2022-03-09T16:19:30Z</dc:date>
    </item>
  </channel>
</rss>

