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
CREATE TABLE [dwh].[TargetPerConsultant]( | |
[RowID] [int] IDENTITY(1,1) PRIMARY KEY, | |
[Firstname] [varchar](50) NULL, | |
[TargetAmount] [smallmoney] NULL | |
) ON [PRIMARY] | |
GO | |
INSERT INTO [dwh].[TargetPerConsultant] (FirstName,TargetAmount) | |
VALUES ('Arthur',1200), | |
('Erik', 1000), |
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
CREATE view [Model].[vw_GeoIntersects] | |
as | |
WITH Coordinates AS ( | |
SELECT | |
ID | |
, Latitude | |
, Longitude | |
, geometry::Point(Longitude, Latitude, 0) AS LatLon |
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
SELECT geometry::STPolyFromText ('POLYGON((4.482593 51.904314, 4.484181 51.903189, 4.492163 51.906790, 4.489653 51.907769, 4.482593 51.904314))', 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
Days since last sale = | |
DATEDIFF( | |
[Previous Date of Sales] | |
, MIN(FactInternetSales[OrderDate]) | |
, DAY | |
) |
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
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
{"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
#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": "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
IsAboveThreshold = IF([Lastest CPU] > [Threshold (average past 5)] +5 , 1 , 0) |
NewerOlder