<?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: Count on the basis of string in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240489#M119208</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="122250" data-lia-user-login="Amitkr174" class="lia-mention lia-mention-user"&gt;Amitkr174&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Segmants is a new disconnect table. You can insert manually or use my proposed DAX to create a new &lt;STRONG&gt;calculated table&lt;/STRONG&gt;.&amp;nbsp;&lt;BR /&gt;Please refer to the sample PBIX file that is attached in my original reply for more details.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 14:56:29 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-05-17T14:56:29Z</dc:date>
    <item>
      <title>Count on the basis of string</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240127#M119185</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478098" data-lia-user-login="Mahesh0016" class="lia-mention lia-mention-user"&gt;Mahesh0016&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225330" data-lia-user-login="JihwanKim" class="lia-mention lia-mention-user"&gt;JihwanKim&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="532115" data-lia-user-login="Ajendra" class="lia-mention lia-mention-user"&gt;Ajendra&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474658" data-lia-user-login="ThxAlot" class="lia-mention lia-mention-user"&gt;ThxAlot&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table as below. I need to count the orders and then provide the output as per below table. I want to count the orders and put it in the Occurence band, like if order is &amp;gt;3 and it was requeted by one 1 user, then output should be "&amp;gt;3 orders - 1"&lt;/P&gt;&lt;P&gt;I want a calculated column so that I can create a Graph. Please help on this.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Row Labels&lt;/TD&gt;&lt;TD&gt;Count of Orders&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Vikas Behel&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TIKENDRA SINGH&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Matthew Jackson&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Martin Bonnor&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jake Mendoza&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;George Rose&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sarah Liao&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;John Gehrung&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Joshua Zelman&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Aaron Johnson&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Clement Quek&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Peter Hansen&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Simeon Strang&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jeremy Willmott&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Output&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;gt;3 Orders&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2 Orders&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1 order&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 17 May 2023 12:14:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240127#M119185</guid>
      <dc:creator>Amitkr174</dc:creator>
      <dc:date>2023-05-17T12:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count on the basis of string</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240286#M119197</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="122250" data-lia-user-login="Amitkr174" class="lia-mention lia-mention-user"&gt;Amitkr174&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached sample file wit the proposed soltion.&lt;/P&gt;
&lt;P&gt;First you need to manually create the semants table&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;then use the following measure&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;# Customers = 
SUMX (
    GROUPBY (
        FILTER (
            ADDCOLUMNS ( 
                CROSSJOIN ( 
                    VALUES ( 'Table'[Customer] ),
                    Segmants
                ),
                "@NumOfOrders", [Count of Orders]
            ),
            [@NumOfOrders] &amp;gt; Segmants[Low Limit]
                &amp;amp;&amp;amp; [@NumOfOrders] &amp;lt;= Segmants[High Limit]
        ),
        [@NumOfOrders],
        "@Count", SUMX ( CURRENTGROUP ( ), 1 )
    ),
    [@Count]
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 13:29:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240286#M119197</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-17T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count on the basis of string</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240344#M119201</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; I am getting the below error. Please advise&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;I have created a Return Requestor colum. DAX is below:-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;DAX:-&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;COUNTX (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; FILTER (Table, EARLIER ( Table[Requestor_FullName] ) = Table[Requestor_FullName] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Table[Requestor_FullName]&lt;/P&gt;&lt;P&gt;)&amp;gt;3,"&amp;gt;3 Request",&lt;/P&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;COUNTX (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; FILTER (Table, EARLIER ( Table[Requestor_FullName] ) = Table[Requestor_FullName] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Table[Requestor_FullName]&lt;/P&gt;&lt;P&gt;)=3,"3 Request",&lt;/P&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;COUNTX (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; FILTER (Table, EARLIER ( Table[Requestor_FullName] ) = Table[Requestor_FullName] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Table[Requestor_FullName]&lt;/P&gt;&lt;P&gt;)=2,"2 Request", "1 Request"))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 13:47:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240344#M119201</guid>
      <dc:creator>Amitkr174</dc:creator>
      <dc:date>2023-05-17T13:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count on the basis of string</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240489#M119208</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="122250" data-lia-user-login="Amitkr174" class="lia-mention lia-mention-user"&gt;Amitkr174&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Segmants is a new disconnect table. You can insert manually or use my proposed DAX to create a new &lt;STRONG&gt;calculated table&lt;/STRONG&gt;.&amp;nbsp;&lt;BR /&gt;Please refer to the sample PBIX file that is attached in my original reply for more details.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 14:56:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3240489#M119208</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-17T14:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Count on the basis of string</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3245391#M119535</link>
      <description>&lt;P&gt;A typical, straightforward size-based cohort.&lt;/P&gt;&lt;P&gt;A generic PQ solution&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Tc7dSsNAEAXgVxn2ujcKPkCrkjba0jaiYOjFYA/dJbszMLtB9OmNKaS5/eD8tK17Dx1nWsEjuoV7cKdF6942L8+7p+OSms2uWg98P/KWS/H4ppq/uqwycytBaKUiapPW3IG2kLP+8oQV1C6go2ZM1rCxp9fAesuqF6rgrZfLDLPvmT4RE9/Gl2wq9B+YX3qMSJBChx7dgHcj7lFgtGbJkAmbkDAUNMV43LpqDUP6oY8QY9JSrn76Aw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Row Labels" = _t, #"Count of Orders" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Row Labels", type text}, {"Count of Orders", Int64.Type}}),

    #"Sorted List" = List.Sort(List.Distinct(#"Changed Type"[Count of Orders])),
    Threshold = #"Sorted List"{1}?,
    #"Joined Tables" = Table.NestedJoin(Table.FromList(List.RemoveLastN(#"Sorted List",1),Splitter.SplitByNothing(),{"Count of Orders"}), "Count of Orders", #"Changed Type", "Count of Orders", "Cnt", JoinKind.FullOuter),
    #"Transformed Columns" = Table.TransformColumns(#"Joined Tables", {{"Count of Orders", each _ ?? "&amp;gt;=" &amp;amp; Text.From(Threshold)}, {"Cnt", Table.RowCount}})
in
    #"Transformed Columns"&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 15:28:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3245391#M119535</guid>
      <dc:creator>ThxAlot</dc:creator>
      <dc:date>2023-05-20T15:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Count on the basis of string</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3249443#M119854</link>
      <description>&lt;P&gt;Thanks a lot, that is working fine.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 17:28:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-the-basis-of-string/m-p/3249443#M119854</guid>
      <dc:creator>Amitkr174</dc:creator>
      <dc:date>2023-05-23T17:28:50Z</dc:date>
    </item>
  </channel>
</rss>

