<?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: How to use distinct and get the unique values in created measure (expression) by account name? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-distinct-and-get-the-unique-values-in-created-measure/m-p/4072734#M161686</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example, does your sample data look like this?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Maybe you can try this formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
 VAR _table=DISTINCT('Table')
 RETURN
 SUMX(_table,[Value])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 05:39:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-01T05:39:17Z</dc:date>
    <item>
      <title>How to use distinct and get the unique values in created measure (expression) by account name?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-distinct-and-get-the-unique-values-in-created-measure/m-p/4071495#M161622</link>
      <description>&lt;P&gt;Hi Experts ,&lt;/P&gt;&lt;P&gt;I am stuck with the scenario below :&lt;/P&gt;&lt;P&gt;Recently i have applied unpivot columns for few columns to rearrange the rows &amp;amp; attributes.&lt;/P&gt;&lt;P&gt;After that most of the columns are duplicated (expected) , I have fixed few values related to that columns by using DISTINCT dax , but I cannot use the same DISTINCT into the measure which i have created to summing up the values and with using some other measures as below :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Revenue &amp;amp; Margin = &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;('Delivery Updates',[Revenue*Margin]) --&amp;gt;&amp;nbsp;[Revenue*Margin] is an another measure which result is OK.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The result should be : 51246 euro (1 Account)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But once i did unpivot columns 1 row of account was duplicated as 27 rows with same account name as below :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;before unpivot :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;after unpivot : (27 rows)&lt;/P&gt;&lt;img /&gt;&lt;P&gt;Now the case is I cannot use DISTINCT to get the 1 Account value from this measure.&lt;/P&gt;&lt;P&gt;Now it is showing below huge number : total 27 rows = 27*&lt;SPAN&gt;51246&lt;/SPAN&gt;&lt;/P&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;Please help to fix this part asap &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;Due to this the total margin% is impacted ..&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;DK&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 31 Jul 2024 14:03:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-distinct-and-get-the-unique-values-in-created-measure/m-p/4071495#M161622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-31T14:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use distinct and get the unique values in created measure (expression) by account name?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-distinct-and-get-the-unique-values-in-created-measure/m-p/4072734#M161686</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example, does your sample data look like this?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Maybe you can try this formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
 VAR _table=DISTINCT('Table')
 RETURN
 SUMX(_table,[Value])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 05:39:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-distinct-and-get-the-unique-values-in-created-measure/m-p/4072734#M161686</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-01T05:39:17Z</dc:date>
    </item>
  </channel>
</rss>

