This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$endpoint = "<<Your Endpoint comes here>>" | |
while($true) | |
{ | |
$ComputerCPU = (Get-WmiObject -Class win32_processor -ErrorAction Stop | Measure-Object -Property LoadPercentage -Average | Select-Object Average).Average | |
$ComputerMemory = Get-WmiObject -Class win32_operatingsystem -ErrorAction Stop | |
$UsedMemory = $ComputerMemory.TotalVisibleMemorySize - $ComputerMemory.FreePhysicalMemory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lastest CPU = | |
VAR TopNTime = TOPN(1 , RealTimeData , RealTimeData[Time] ,DESC ) | |
return | |
CALCULATE(min(RealTimeData[CPU]) , TopNTime) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Threshold (average past 5) = | |
VAR top5 = TOPN( 5, RealTimeData , RealTimeData[Time] , DESC) | |
RETURN | |
CALCULATE(AVERAGE(RealTimeData[CPU]) , top5 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IsAboveThreshold = IF([Lastest CPU] > [Threshold (average past 5)] +5 , 1 , 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "AdaptiveCard", | |
"body": [ | |
{ | |
"type": "ColumnSet", | |
"separator": true, | |
"columns": [ | |
{ | |
"type": "Column", | |
"width": "stretch", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Log in to Power BI Service | |
Login-PowerBI -Environment Public | |
#First, Collect all (or one) of the workspaces in a parameter called PBIWorkspace | |
$PBIWorkspace = Get-PowerBIWorkspace # Collect all workspaces you have access to | |
#$PBIWorkspace = Get-PowerBIWorkspace -Name 'My Workspace Name' # Use the -Name parameter to limit to one workspace | |
#Now collect todays date | |
$TodaysDate = Get-Date -Format "yyyyMMdd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"type":"FeatureCollection", "features": [ | |
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-0.08555539569718484,51.51981579755783],[-0.0834559420329396,51.51981579755783],[-0.08141032051393143,51.52091610672171],[-0.08141032051393143,51.522016415885574],[-0.07828805609018208,51.522016415885574],[-0.07931086684968619,51.518715488393966],[-0.07828805609018208,51.518715488393966],[-0.07721141318544089,51.516514870066224],[-0.07408914876169159,51.51431425173849],[-0.07306633800218748,51.51211363341075],[-0.07306633800218748,51.50991301508301],[-0.07516579166643272,51.50991301508301],[-0.07618860242593684,51.51101332424688],[-0.07931086684968619,51.50991301508301],[-0.07931086684968619,51.507712396755274],[-0.08141032051393143,51.50881270591914],[-0.0886776601209342,51.50881270591914],[-0.09179992454468355,51.50991301508301],[-0.09599883187317404,51.50991301508301],[-0.1001439070564275,51.51101332424688],[-0.11161015399192076,51.51101332424688],[-0.11161015399192076,51.51541456090236],[-0.113655775 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previous Date of Sales = | |
MAXX( | |
ADDCOLUMNS( | |
SUMMARIZE( | |
'FactInternetSales' | |
,'Product Name'[EnglishProductName] | |
,'FactInternetSales'[OrderDate] | |
) | |
,"@PreviousDate" | |
, CALCULATE( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Value of Previous Date Sales = | |
VAR PreviousDate = [Previous Date of Sales] | |
RETURN | |
CALCULATE( | |
[Sum Amount] | |
,'FactInternetSales'[OrderDate] = PreviousDate | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Days since last sale = | |
DATEDIFF( | |
[Previous Date of Sales] | |
, MIN(FactInternetSales[OrderDate]) | |
, DAY | |
) |
OlderNewer