<?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 of people attending a meeting in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991732#M12339</link>
    <description>&lt;P&gt;Here's the M code for Power Query to transform the data into a normalized form:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k1NLcnMS1cwVNJR8sovzlBwyyzOOLQAyHNJLEtVcMrPKcnPA/JjdRBqjSDy+XmJOSkKLkWZZalFOgpg5c6JJQT0GiPbo6Pgm1ihEJBfDjLArSg1RSE4N7MkA6wkIw/KgetOz1MwAUr55eeloqiA2g2xTik2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Meeting = _t, #"External People" = _t, #"Internal People" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Meeting", type text}, {"External People", type text}, {"Internal People", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Meeting"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] &amp;lt;&amp;gt; "None")),
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Filtered Rows", {{"Value", Splitter.SplitTextByDelimiter(",", QuoteStyle.None), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Value"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Value", type text}}),
    #"Trimmed Text" = Table.TransformColumns(#"Changed Type1",{{"Value", Text.Trim, type text}}),
    #"Renamed Columns" = Table.RenameColumns(#"Trimmed Text",{{"Attribute", "Attendee Type"}, {"Value", "Attendee"}})
in
    #"Renamed Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just paste this into the Advance Editor in PQ and execute. You'll see how this is done. Then create the measures I've already told you about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2020 19:59:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-25T19:59:08Z</dc:date>
    <item>
      <title>Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991021#M12304</link>
      <description>&lt;P&gt;I am looking to count the amount of people attending meetings by Enternal and Interanl. See example of the sort of data I am working with below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Meeting&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;External People&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Internal People&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Meeting 1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Josh Fish&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Dave Bolton&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Meeting 2&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Donald Driver, Dave Cat&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Dave Bolton&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Meeting 3&lt;/TD&gt;&lt;TD&gt;Josh Fish, Max Power, Fred Smith&lt;/TD&gt;&lt;TD&gt;John Smith&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Meetign 4&lt;/TD&gt;&lt;TD&gt;None&lt;/TD&gt;&lt;TD&gt;John Smith, Dave Bolton&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 25 Mar 2020 12:57:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991021#M12304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T12:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991107#M12308</link>
      <description>&lt;P&gt;How about this solution posted by someone else? You basically count the number of comma's +1 and you have the number of people attending:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Count-no-of-comma-occurrences-in-a-column/td-p/79183" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/Count-no-of-comma-occurrences-in-a-column/td-p/79183&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 13:39:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991107#M12308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T13:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991168#M12309</link>
      <description>&lt;P&gt;Thanks. I tried this but meetings where there are "None" External people it comes up with 1 rather than 0.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 14:17:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991168#M12309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T14:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991388#M12321</link>
      <description>&lt;P&gt;Ah yes, so then you write something like this instead of +1:&lt;/P&gt;&lt;P&gt;+&lt;BR /&gt;IF( internal_people = BLANK(),0,1)&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 16:04:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991388#M12321</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T16:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991680#M12335</link>
      <description>&lt;P&gt;The I can't seem to add the IF function to an Meaured column and refrnce the column. And the formular from the link doesn't work in a new column it come up with the right number half the time. See example of code used below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=
LEN(Internal_People)-LEN(SUBSTITUTE(Internal_People,",",""))+IF(Internal_People=BLANK(),0,1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 18:42:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991680#M12335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T18:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991721#M12337</link>
      <description>&lt;P&gt;The data format for this is wrong. Good models store one piece of info in a cell, not many of them. Please use Power Query to normalize the data first and then your measures will be very easy to write.&lt;/P&gt;
&lt;P&gt;It'll be as easy as&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[People Count] = DISTINCTCOUNT( T[Person] )

[External People Count] =
CALCULATE(
	[People Count],
	KEEPFILTERS( T[Person Type] = "External" )
)

[Internal People Count] =
CALCULATE(
	[People Count],
	KEEPFILTERS( T[Person Type] = "Internal" )
)&lt;/LI-CODE&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 19:49:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991721#M12337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T19:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991732#M12339</link>
      <description>&lt;P&gt;Here's the M code for Power Query to transform the data into a normalized form:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k1NLcnMS1cwVNJR8sovzlBwyyzOOLQAyHNJLEtVcMrPKcnPA/JjdRBqjSDy+XmJOSkKLkWZZalFOgpg5c6JJQT0GiPbo6Pgm1ihEJBfDjLArSg1RSE4N7MkA6wkIw/KgetOz1MwAUr55eeloqiA2g2xTik2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Meeting = _t, #"External People" = _t, #"Internal People" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Meeting", type text}, {"External People", type text}, {"Internal People", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Meeting"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] &amp;lt;&amp;gt; "None")),
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Filtered Rows", {{"Value", Splitter.SplitTextByDelimiter(",", QuoteStyle.None), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Value"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Value", type text}}),
    #"Trimmed Text" = Table.TransformColumns(#"Changed Type1",{{"Value", Text.Trim, type text}}),
    #"Renamed Columns" = Table.RenameColumns(#"Trimmed Text",{{"Attribute", "Attendee Type"}, {"Value", "Attendee"}})
in
    #"Renamed Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just paste this into the Advance Editor in PQ and execute. You'll see how this is done. Then create the measures I've already told you about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 19:59:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/991732#M12339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T19:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count of people attending a meeting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/992921#M12373</link>
      <description>&lt;P&gt;Jup Darloves solution is the better one, mine is just trying to work around a sub-optimal table, but his goes to the root of the issue and fixes it. Do what he suggests!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 09:04:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-people-attending-a-meeting/m-p/992921#M12373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-26T09:04:24Z</dc:date>
    </item>
  </channel>
</rss>

