<?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 Peak Hour Traffic in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792478#M4584</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help with my dax calculation. How do I get the Peak Hour Traffic calculation in power bi. Below is the sample metrics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Sep 2019 22:54:46 GMT</pubDate>
    <dc:creator>daciga</dc:creator>
    <dc:date>2019-09-14T22:54:46Z</dc:date>
    <item>
      <title>Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792478#M4584</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help with my dax calculation. How do I get the Peak Hour Traffic calculation in power bi. Below is the sample metrics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2019 22:54:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792478#M4584</guid>
      <dc:creator>daciga</dc:creator>
      <dc:date>2019-09-14T22:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792481#M4585</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;We need more info, what does your data look like?&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2019 23:15:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792481#M4585</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-14T23:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792483#M4586</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Nathaniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kilndly see attached CSV file. In the data its obvious that the Max Call Time is 2PM. What I need to know is the DAX formulation to find the desired computation. I have looked over the same topic here in PBI community but none of them captured my DAX problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2019 23:34:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792483#M4586</guid>
      <dc:creator>daciga</dc:creator>
      <dc:date>2019-09-14T23:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792488#M4587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for the file, but I see no 2 PM calls. Also What is Group_time? So are you aggregating these by the hour?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2019 23:53:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792488#M4587</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-14T23:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792497#M4589</link>
      <description>&lt;P&gt;Hello Nathaniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes exactly. you may remove the group time since it should not be included in the calculation. What is needed is the number of calls per hour and which ever is the time with most calls (i.e. 2PM in my example) should be the "Max Call Time".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other calculation here in PBI community only solved the average calls per time as shown in their computation. Whenever I tried the MAXIMUM formulation it only produces the maximum time (i.e. 24 Hours or simply 24) as the output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 00:04:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792497#M4589</guid>
      <dc:creator>daciga</dc:creator>
      <dc:date>2019-09-15T00:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792498#M4590</link>
      <description>&lt;P&gt;Its 2AM and not 2PM. My mistake.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 00:09:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792498#M4590</guid>
      <dc:creator>daciga</dc:creator>
      <dc:date>2019-09-15T00:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792511#M4591</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a visual for you. First I added a new column and ended with table. The new column just peeled off the hour. I changed it to a whole number type. Then created a matrix by dropping Calls[Hours] which groups the different hours. Then created a measure that sums up the number of calls per hour.&amp;nbsp; So as you see, 2 has the most calls 12.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&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;&lt;PRE&gt;= Table.AddColumn(#"Changed Type", "Custom", each Time.Hour([Time]))&lt;/PRE&gt;&lt;P&gt;&lt;img /&gt;&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;PRE&gt;Count = SUM('Calls'[Hour])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 01:49:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792511#M4591</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-15T01:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792518#M4592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;For the max count as a card.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;&lt;PRE&gt;Count max per Hour = 
MAXX(KEEPFILTERS(VALUES('Calls'[Hour])), CALCULATE([Count]))&lt;/PRE&gt;&lt;P&gt;Gives you:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 03:07:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792518#M4592</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-15T03:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792544#M4593</link>
      <description>&lt;P&gt;Hello Nat,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for this excellent calculation! The next challenge would be is how to show in card the most frequent time or most calls that entered into the system say, 2AM in our data as the peak time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 05:30:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792544#M4593</guid>
      <dc:creator>daciga</dc:creator>
      <dc:date>2019-09-15T05:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792598#M4598</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Ok, try this:&lt;/P&gt;&lt;P&gt;New table which I called Summary, which I did in Power BI using SUMMARIZE()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Summary = SUMMARIZE(Calls,Calls[Hour],"HoursSummary",Sum(Calls[Hour]))&lt;/PRE&gt;&lt;P&gt;Then I added a column, using LOOKUPVALUE()&lt;/P&gt;&lt;PRE&gt;High hour = LOOKUPVALUE(Summary[Hour],Summary[HoursSummary],[Count max per Hour])&lt;/PRE&gt;&lt;P&gt;which gave me this table,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and created a measure,&lt;/P&gt;&lt;PRE&gt;Peak Hour Calls = max(Summary[High hour])&lt;/PRE&gt;&lt;P&gt;which I could display in card.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;You could change it to Peak Hour or Peak Hour for Calls to be more descriptive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for posting this interesting problem!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 12:49:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792598#M4598</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-15T12:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792707#M4603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Went back to Power Query, changed the type of Calls[Time] to text and added a new column with if Calls [Time] contains AM then 1 or else if Calls [Time] contains PM then 2 or else null. This way we can add AM/PM back in to the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTKyMjJQcPRVitWJVjIC800sYXxjMN8QLm8C4ZvD+KYQPly9GZhvCldvDuQbI+m3gPDNYHxLIN8EyTxDA6CAKcxBsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ClientID = _t, Time = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ClientID", Int64.Type}, {"Time", type time}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Time.Hour([Time])),
    #"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "Hour"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Hour", Int64.Type}, {"Time", type text}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type1", "AM/PM", each if Text.Contains([Time], "AM") then 1 else if Text.Contains([Time], "PM") then 2 else null),
    #"Changed Type2" = Table.TransformColumnTypes(#"Added Conditional Column",{{"AM/PM", Int64.Type}})
in
    #"Changed Type2"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then added a new column in Power BISummary[AM/PM2] to use LOOKUPVALUE () to search the CALLS table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AM/PM2 = LOOKUPVALUE(Calls[AM/PM],Calls[Hour],Summary[High hour])&lt;/PRE&gt;&lt;P&gt;Then rewrote Peak Hour Calls to surround what we had with a CONCATENATE() and included an IF to pick AM or PM.&lt;/P&gt;&lt;PRE&gt;Peak Hour Calls = CONCATENATE(FORMAT(max(Summary[High hour]),"General Number"), If(MAX(Summary[AM/PM2]) = 1," AM"," PM"))&lt;/PRE&gt;&lt;P&gt;You can expand the if to include the null possibility.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&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;&lt;P&gt;&lt;img /&gt;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 23:50:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/792707#M4603</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-15T23:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/793239#M4614</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The computation worked!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I add more calls or 5,000 calls for 7 days and use a slicer to group the calls per day, the peak hour card you made didnt work or remain static at 2AM. What could possibly went wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 12:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/793239#M4614</guid>
      <dc:creator>daciga</dc:creator>
      <dc:date>2019-09-16T12:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/793386#M4620</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you say you add more calls...do you mean calls on the same day? Or is it a second day that is the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 14:41:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/793386#M4620</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-16T14:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/793723#M4632</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Ok it looks like I used SUM at one point, when I should have used COUNT. So going back to the beginning I added more calls spread into the PM. Midnight is 12 AM by convention.&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;PRE&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Xc+7DcQgDIDhVU7UKfALQrob4KTrUfZfI44dHET5f4Blek+QtoQH5s/3l86tJ7TmNpqsIc7Zu44W77hfrCXuV22a3u/eZXTT5mkeZAWZFoJ7Q8Ajv4I2Q+H/ANmbCdgAMEAcKKA4cEB1kIB9hbYA+qr6lwH3qnXaA3EFej7jQ84L", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ClientID = _t, Time = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ClientID", Int64.Type}, {"Time", type time}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Time.Hour([Time])),
    #"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "Hour"}}),
    #"Added Conditional Column" = Table.AddColumn(#"Renamed Columns", "Custom", each if [Time] &amp;lt; #time(12, 0, 0) then 1 else 2),
    #"Renamed Columns1" = Table.RenameColumns(#"Added Conditional Column",{{"Custom", "AM/PM"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns1",{{"AM/PM", Int64.Type}})
in
    #"Changed Type1"&lt;/PRE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So, now we have 23 calls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 tables&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This table created by:&lt;/P&gt;&lt;PRE&gt;Summary = SUMMARIZE(Calls,Calls[Hour],"HoursSummary",COUNT(Calls[Hour]))&lt;/PRE&gt;&lt;PRE&gt;Calls per hour = max(Summary[HoursSummary])&lt;/PRE&gt;&lt;PRE&gt;Lookup Hour = LOOKUPVALUE(Summary[Hour],Summary[HoursSummary],Summary[Calls per hour])&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;Lookup AM/PM = LOOKUPVALUE(Calls[AM/PM],Calls[Hour],MAX(Summary[Lookup Hour]))&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then measures:&lt;/P&gt;&lt;PRE&gt;Highest # of Calls per Hour = Max(Summary[Calls per hour])&lt;/PRE&gt;&lt;PRE&gt;Peak Hour for Calls = 
IF(Value(MAX(Summary[Lookup Hour]))&amp;gt;12,CONCATENATE(Value(Max(Summary[Lookup Hour]))-12," PM"),
CONCATENATE(Value(max(Summary[Lookup Hour])), " AM"))&lt;/PRE&gt;&lt;PRE&gt;Total Calls = Count(Calls[Hour])&lt;/PRE&gt;&lt;P&gt;and the visuals&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;You may have to do a little work as the Time() function calls the hour from midnight to 1 AM the 0 hour as you can see by the top value in this picture.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 23:06:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/793723#M4632</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-16T23:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/794527#M4648</link>
      <description>&lt;P&gt;&lt;BR /&gt;First of all, thank you for your effort into doing the calculation!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Some slight problem. I cannot seemed to go pass through the lookup hour calculation for I keep on getting an error message on that part.&lt;/P&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;&lt;P&gt;&amp;nbsp;&lt;/P&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;&lt;P&gt;&amp;nbsp;&lt;/P&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;&lt;P&gt;&amp;nbsp;&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com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/794527#M4648</guid>
      <dc:creator>daciga</dc:creator>
      <dc:date>2019-09-17T13:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/794618#M4650</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AgCd7AyfqZtExDKdi-utQZ_hEnGD?e=jXhYnI" target="_blank" rel="noopener"&gt;PBIX for Peak Hours&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the file for what I have so far.&amp;nbsp; What is the error that you are getting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 14:22:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/794618#M4650</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-17T14:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/996139#M12495</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp; Your answer helped me a lot to get started with my problem in hand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have posted it here,&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Find-peakhour-and-PeakCount-based-on-time-based-data-for/m-p/996135#M473599" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/Find-peakhour-and-PeakCount-based-on-time-based-data-for/m-p/996135#M473599&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me on that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do the same but data needs to be filtered by selected Date as well.&amp;nbsp; Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 22:12:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/996139#M12495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-27T22:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/2490358#M68546</link>
      <description>&lt;P&gt;How did you calculate the HoursSummary - where does it refer to?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 08:11:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/2490358#M68546</guid>
      <dc:creator>btfly_x23</dc:creator>
      <dc:date>2022-05-03T08:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/2517589#M70065</link>
      <description>&lt;P&gt;I have the same task to determine the Peak Hours Traffic, but, in my case, I do not have HoursSummary given. Therefore, I would be interested to know how can I display the Peak Hours in the visual "Card" without having this info "HoursSummary"? Or is it better to use charts for visualisation of peak hours?&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 13:05:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/2517589#M70065</guid>
      <dc:creator>btfly_x23</dc:creator>
      <dc:date>2022-05-16T13:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Peak Hour Traffic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/2522446#M70405</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="171012" data-lia-user-login="daciga" class="lia-mention lia-mention-user"&gt;daciga&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;could you clarify my question above, please?&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 07:28:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Peak-Hour-Traffic/m-p/2522446#M70405</guid>
      <dc:creator>btfly_x23</dc:creator>
      <dc:date>2022-05-18T07:28:37Z</dc:date>
    </item>
  </channel>
</rss>

