% Actual vs Budget YTD OPEX =
IF(
ISFILTERED('Calendar'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
DIVIDE(
TOTALYTD(
SUM('OPEX'[Actual]),
'Calendar'[Date].[Date]
),
This file contains hidden or 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
| import { Component, OnInit, ElementRef } from '@angular/core'; | |
| import { select } from 'd3-selection'; | |
| import { scaleLinear } from 'd3-scale'; | |
| import { range, histogram, max } from 'd3-array'; | |
| import { format } from 'd3-format'; | |
| import { randomBates } from 'd3-random'; | |
| import { axisBottom } from 'd3-axis'; | |
| @Component({ | |
| selector:'histogram', |
This file contains hidden or 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
| using System.Collections.Generic; | |
| using iTextSharp.text.pdf; | |
| using iTextSharp.text.pdf.parser; | |
| using Microsoft.Analytics.Interfaces; | |
| namespace PDFExtractor | |
| { | |
| [SqlUserDefinedExtractor(AtomicFileProcessing = true)] | |
| public class PDFExtractor : IExtractor | |
| { |
This file contains hidden or 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
| using Microsoft.Analytics.Interfaces; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| namespace DocExtraction.Udo | |
| { | |
| [SqlUserDefinedExtractor(AtomicFileProcessing = true)] | |
| public class ZipExtractor : IExtractor | |
| { | |
| private readonly bool _textMode; |
This file contains hidden or 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
| WITH cte_tableScripts AS ( | |
| SELECT | |
| so.name AS TableName, | |
| 'CREATE TABLE [' + so.name + '] (' + o.list + ')' + CASE WHEN tc.Constraint_Name IS NULL THEN '' ELSE 'ALTER TABLE ' + so.Name + ' ADD CONSTRAINT ' + tc.Constraint_Name + ' PRIMARY KEY ' + ' (' + LEFT(j.List, Len(j.List)-1) + ')' END AS Script | |
| FROM sysobjects so | |
| CROSS apply | |
| (SELECT | |
| ' ['+column_name+'] ' + | |
| data_type + CASE data_type | |
| WHEN 'sql_variant' THEN '' |
This file contains hidden or 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
| from sqlalchemy import create_engine | |
| import urllib | |
| import pyodbc | |
| import pandas as pd | |
| df = pd.read_csv("./data.csv") | |
| quoted = urllib.parse.quote_plus("DRIVER={SQL Server Native Client 11.0};SERVER=(localDb)\ProjectsV14;DATABASE=database") | |
| engine = create_engine('mssql+pyodbc:///?odbc_connect={}'.format(quoted)) |
This file contains hidden or 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
| param( | |
| [String] | |
| $sourceAzureSubscriptionId, | |
| [String[]] | |
| $targetAzureSubscriptionIds | |
| ) | |
| Select-AzureRmSubscription -Subscription $sourceAzureSubscriptionId | |
| $registeredProviders = Get-AzureRmResourceProvider | Where {$_.RegistrationState -eq "Registered"} |
This file contains hidden or 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
| ;WITH cte_dailyJobs AS ( | |
| SELECT | |
| DataLoadJobId, | |
| LoadTime, | |
| RANK() OVER(PARTITION BY CONVERT(date, LoadTime) ORDER BY LoadTime DESC) AS Rank | |
| FROM [dbo].[DataLoadJob] | |
| ) | |
| SELECT * FROM cte_dailyJobs WHERE Rank = 1 | |
| ORDER BY LoadTime DESC |
Step 1 - Generate FY calendar table:
Approvals calendar = CALENDAR(
IF(
MONTH(NOW()) <= 6,
DATE(YEAR(NOW())-1, 7, 1),
DATE(YEAR(NOW()), 7, 1)
),
IF(
This file contains hidden or 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
| let EncodeBasicCredentials = (UserName, Password) => | |
| let | |
| result = "Basic " & Binary.ToText(Text.ToBinary(#"UserName" & ":" & #"Password"),0) | |
| in | |
| result | |
| in EncodeBasicCredentials |
OlderNewer