<?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 Count distinct occurrences in last month. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2899609#M94389</link>
    <description>&lt;P&gt;I creating a scorecard for suppliers and try create 2 measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. counting distinct occurance in last month&lt;/P&gt;&lt;P&gt;2 counting distinct occurances in last 6 months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dax formula will be similar just cant get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My table colums are:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 08:40:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-11-11T08:40:00Z</dc:date>
    <item>
      <title>Count distinct occurrences in last month.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2899609#M94389</link>
      <description>&lt;P&gt;I creating a scorecard for suppliers and try create 2 measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. counting distinct occurance in last month&lt;/P&gt;&lt;P&gt;2 counting distinct occurances in last 6 months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dax formula will be similar just cant get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My table colums are:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 08:40:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2899609#M94389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-11T08:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct occurrences in last month.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2899645#M94391</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;If your datamodel does not have dim-date-column, try using some DAX functions like below.&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;Last six months distinct category count: =
VAR _currentmonth =
    EOMONTH ( TODAY (), 0 )
VAR _startingmonth =
    EOMONTH ( TODAY (), -6 ) + 1
RETURN
    CALCULATE (
        DISTINCTCOUNT ( Data[Category] ),
        Data[Date] &amp;lt;= _currentmonth,
        Data[Date] &amp;gt;= _startingmonth
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 08:55:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2899645#M94391</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-11-11T08:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct occurrences in last month.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2899689#M94394</link>
      <description>&lt;P&gt;This is perfect! Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on the count I want to assign a score. Is is better to do it in the same measure or do you create seperate measre?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;0 NCM = 100/100 (assigned score)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1 NCMs = 75/100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2 NCMs = 50/100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3+ NCMs = 0/100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 09:09:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2899689#M94394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-11T09:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct occurrences in last month.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2901226#M94498</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your feedback.&lt;/P&gt;
&lt;P&gt;I think it depends on how you want to create a visualization.&lt;/P&gt;
&lt;P&gt;If you want to show it one by one in a card visualization, you can separately create each measure.&lt;/P&gt;
&lt;P&gt;If you want to show it by a bar chart, for instance, 0,1,2,+3 are the component of the axis and you have to create an axis table separately, and use one measure to show them as a bar chart.&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 05:13:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-occurrences-in-last-month/m-p/2901226#M94498</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-11-12T05:13:01Z</dc:date>
    </item>
  </channel>
</rss>

