<?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: Distinct Count selected elements in a column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1270504#M21397</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="249712" data-lia-user-login="OliverMatsik" class="lia-mention lia-mention-user"&gt;OliverMatsik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if this is what you are looking at&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=hGdYR1KR3rc" target="_blank"&gt;https://www.youtube.com/watch?v=hGdYR1KR3rc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=MhYEqniwung" target="_blank"&gt;https://www.youtube.com/watch?v=MhYEqniwung&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=dVxg_ZO1gn0" target="_blank"&gt;https://www.youtube.com/watch?v=dVxg_ZO1gn0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2020 07:12:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-04T07:12:45Z</dc:date>
    <item>
      <title>Distinct Count selected elements in a column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1268003#M21304</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling with a calculated column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to make a line diagram to compare 2017 - 2019 revenue trends with 2020, with the possibility to filter between 2017 - 2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you have all years selected, the sum of the 3 years revenue is diveded by 3, if you select two years then by 2 and if you only click on one year then by 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a measure which seems to work perfectly but when I copy it in to the calculated column it doesn't work at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It basically says: "If 2020 is part of the filter than deduct one, if it is not then count the years up to 3 (there are more years but I'm only showing 2017, 2018, 2019)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(IF(CONTAINS(FinancialData,FinancialData[Date].[Year],2020) = TRUE ,&lt;/P&gt;&lt;P&gt;DISTINCTCOUNT(FinancialData[Date].[Year]) - 1, DISTINCTCOUNT(FinancialData[Date].[Year]))&amp;gt;=3 , 3 ,IF(CONTAINS(FinancialData,FinancialData[Date].[Year],2020) = TRUE ,&lt;/P&gt;&lt;P&gt;DISTINCTCOUNT(FinancialData[Date].[Year]) - 1, DISTINCTCOUNT(FinancialData[Date].[Year]))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me out how to make it work in a calculated column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 09:11:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1268003#M21304</guid>
      <dc:creator>OliverMatsik</dc:creator>
      <dc:date>2020-08-03T09:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count selected elements in a column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1268159#M21307</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="249712" data-lia-user-login="OliverMatsik" class="lia-mention lia-mention-user"&gt;OliverMatsik&lt;/a&gt; , You can create two slicers one on depending on the date table and another on an independent date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the date table, you can take distinct count of year and divide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this. You have use year in place of dates&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 10:18:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1268159#M21307</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-03T10:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count selected elements in a column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1268376#M21315</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="249712" data-lia-user-login="OliverMatsik" class="lia-mention lia-mention-user"&gt;OliverMatsik&lt;/a&gt;&amp;nbsp;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 11:57:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1268376#M21315</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-03T11:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count selected elements in a column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1270504#M21397</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="249712" data-lia-user-login="OliverMatsik" class="lia-mention lia-mention-user"&gt;OliverMatsik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if this is what you are looking at&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=hGdYR1KR3rc" target="_blank"&gt;https://www.youtube.com/watch?v=hGdYR1KR3rc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=MhYEqniwung" target="_blank"&gt;https://www.youtube.com/watch?v=MhYEqniwung&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=dVxg_ZO1gn0" target="_blank"&gt;https://www.youtube.com/watch?v=dVxg_ZO1gn0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 07:12:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-selected-elements-in-a-column/m-p/1270504#M21397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-04T07:12:45Z</dc:date>
    </item>
  </channel>
</rss>

