<?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: peaks by hour and reporting with to reference dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1411419#M26166</link>
    <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your answers and I'm sorry if it's not really clear.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try the solution at work tomorrow and keep you up to date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Benjamin&lt;/P&gt;</description>
    <pubDate>Sun, 04 Oct 2020 12:27:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-10-04T12:27:48Z</dc:date>
    <item>
      <title>peaks by hour and reporting with to reference dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1409656#M26103</link>
      <description>&lt;DIV&gt;&lt;FONT&gt;Hi, &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;I'm new in the community so to present myself I'm Benjamin, I work in a company which repair datacenters problems &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Despite my 8 hours traning on power BI, there're several things I don't manage to do. And after several hours of research I prefer to ask.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;I've a database of incidents (cases) opened and closed in the datacenters. &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;To simplify, I mostly need 3 columns :&lt;BR /&gt;- incident_ref = text --&amp;gt; that's the reference of each opened cases&lt;BR /&gt;- open_time = dd/mm/yyyy hh:mm:ss for each cases&lt;BR /&gt;- closed_time = dd/mm/yyyy hh:mm:ss&amp;nbsp; for each cases&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;I need to calculate two indicators :&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;PEAK &amp;gt;200 -- &amp;gt; I need to calculate, on an hour basis, when there's more than 200 incidents. In Excel, I make a dynamic cross table (nb of rows by hours) and apply a sum.if &amp;gt; 200 on it, and I display the result for the month. I have to use the column "open_time" for this. For example : if&amp;nbsp; hour 1 = 196 ; hour 2 = 206 ; hour 3 = 120 ; hour 4 = 400, then the total to calculate is 400+206 = 606 cases in peak. &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Nb of cases --&amp;gt; I also need to calculate the total amount of cases for this month. Easy. But this measure has to be done with the closed_time (for the billing). &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;The aim is to build a reporting board which display : &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Month&amp;nbsp;&amp;nbsp; Total cases&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEAKS &amp;gt;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total cases - PEAK&amp;gt;200&lt;BR /&gt;August &amp;nbsp; 4000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 400 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 4000-400 = 3600&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&lt;FONT&gt;I don't manage to correctly build a board with two measures based on two different date time. And I also don't manage to calculate the peak in a measure.&amp;nbsp; T&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT&gt;he fact that the date are with precise hh:mm:ss is also a problem to calculate peak by hour.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;I really thank you for your help, and I'm sorry for my bad english.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;How would you do this ? &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Benjamin&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Oct 2020 13:39:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1409656#M26103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-02T13:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: peaks by hour and reporting with to reference dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1410349#M26126</link>
      <description>This is not clear. Please post some examples, maybe screenshots... maybe some data. Generally, everything that clarifies the issue is good.</description>
      <pubDate>Fri, 02 Oct 2020 19:37:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1410349#M26126</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2020-10-02T19:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: peaks by hour and reporting with to reference dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1410749#M26145</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This should do the trick:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_CasesInPeak = 
SUMX(
SUMMARIZE(tblPeak,[_Month],[_Day],[_Hour], "c", COUNTROWS(tblPeak)) ,
IF([c] &amp;gt; 200,[c],BLANK())
)

_Month = MONTH('tblPeak'[open_time])
_Day = DAY('tblPeak'[open_time])
_Hour = HOUR('tblPeak'[open_time])
_TotalCasesMinusCasesInPeak = COUNTROWS(tblPeak) - [_CasesInPeak]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As seen here (days as rows, hours in columns):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Testdata generated with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tblPeak = 
var _tbl = 
	SELECTCOLUMNS(
		CROSSJOIN(
			ROW("test", DATE(2020, 10,3)),
			GENERATESERIES(1,28,1)
			), "StartDate", [test], "Increment", [Value])

var _dates = 
ADDCOLUMNS(	_tbl, "NewDate", [StartDate]+[Increment]) 

return
SELECTCOLUMNS(
    ADDCOLUMNS(
        CROSSJOIN(
        _dates, GENERATESERIES(1,1100,1)), "open_time", [NewDate] +  NORM.INV(RAND(), 0.5 + ([Increment]/100), 0.08), "incident_ref", CONVERT( UNICHAR(RANDBETWEEN(65,90)),STRING) &amp;amp; CONVERT( UNICHAR(RANDBETWEEN(65,90)),STRING) &amp;amp; CONVERT( UNICHAR(RANDBETWEEN(65,90)),STRING)
        ), "open_time", [open_time], "incident_ref", [incident_ref]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to &lt;A href="https://1drv.ms/u/s!AvU6hhKLfmEcgsZyMfNT4U2pNzKx4w?e=e7YruO" target="_self"&gt;file&lt;/A&gt;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please mark as solution if so. Thumbs up for the effort are appreciated.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&amp;nbsp;&lt;BR /&gt;Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 11:46:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1410749#M26145</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-10-03T11:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: peaks by hour and reporting with to reference dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1411419#M26166</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your answers and I'm sorry if it's not really clear.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try the solution at work tomorrow and keep you up to date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Benjamin&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 12:27:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1411419#M26166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-04T12:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: peaks by hour and reporting with to reference dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1411432#M26167</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Welcome. Will await your response tomorrow. Pls tag me in your response.&lt;/P&gt;&lt;P&gt;Have a nice Sunday. Kind regards, Steve&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 12:45:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1411432#M26167</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-10-04T12:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: peaks by hour and reporting with to reference dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1412784#M26198</link>
      <description>&lt;P&gt;Many thanks !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works perfectly, and the dashboard is wonderfull.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your reactivity and help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Benjamin&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 09:46:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1412784#M26198</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-05T09:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: peaks by hour and reporting with to reference dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1412976#M26205</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glad to be of help!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 11:06:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/peaks-by-hour-and-reporting-with-to-reference-dates/m-p/1412976#M26205</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-10-05T11:06:55Z</dc:date>
    </item>
  </channel>
</rss>

