From 9304105c694f4332615405ea8066c75a63107db6 Mon Sep 17 00:00:00 2001 From: Christian Wade Date: Mon, 17 Apr 2017 20:14:33 -0700 Subject: [PATCH] 1400 v1 --- - Copy.gitignore | 245 + .gitignore | 1 + ...sPartitionProcessing.AdventureWorks.smproj | 2 +- .../Model.bim | 6561 ++++------------- ...ionProcessing.ConfigurationLogging.sqlproj | 81 + .../SampleConfiguration.sql | 49 + .../Script.PostDeployment1.sql | 13 + .../dbo/Tables/ModelConfiguration.sql | 12 + .../dbo/Tables/PartitioningConfiguration.sql | 16 + .../dbo/Tables/ProcessingLog.sql | 10 + .../dbo/Tables/TableConfiguration.sql | 9 + .../dbo/Views/vPartitioningConfiguration.sql | 31 + .../App.config | 6 +- .../Program.cs | 97 +- .../AsPartitionProcessing.sln | 26 +- .../PartitionProcessor.cs | 42 +- 16 files changed, 1864 insertions(+), 5337 deletions(-) create mode 100644 - Copy.gitignore create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/AsPartitionProcessing.ConfigurationLogging.sqlproj create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/SampleConfiguration.sql create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/Script.PostDeployment1.sql create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ModelConfiguration.sql create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/PartitioningConfiguration.sql create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ProcessingLog.sql create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/TableConfiguration.sql create mode 100644 AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Views/vPartitioningConfiguration.sql diff --git a/ - Copy.gitignore b/ - Copy.gitignore new file mode 100644 index 0000000..3a2238d --- /dev/null +++ b/ - Copy.gitignore @@ -0,0 +1,245 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +[Xx]64/ +[Xx]86/ +[Bb]uild/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml + +# TODO: Un-comment the next line if you do not want to checkin +# your web deploy settings because they may include unencrypted +# passwords +#*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# LightSwitch generated files +GeneratedArtifacts/ +ModelManifest.xml + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3a2238d..39414b5 100644 --- a/.gitignore +++ b/.gitignore @@ -184,6 +184,7 @@ ClientBin/ [Ss]tyle[Cc]op.* ~$* *~ +*.jfm *.dbmdl *.dbproj.schemaview *.pfx diff --git a/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/AsPartitionProcessing.AdventureWorks.smproj b/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/AsPartitionProcessing.AdventureWorks.smproj index d26bf54..e84e27d 100644 --- a/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/AsPartitionProcessing.AdventureWorks.smproj +++ b/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/AsPartitionProcessing.AdventureWorks.smproj @@ -22,7 +22,7 @@ bin\ - localhost + localhost:63192 Developer Version_11_0 AdventureWorks diff --git a/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/Model.bim b/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/Model.bim index d5e461f..6c47f3e 100644 --- a/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/Model.bim +++ b/AsPartitionProcessing/AsPartitionProcessing.AdventureWorks/Model.bim @@ -1,27 +1,506 @@ { "name": "SemanticModel", - "compatibilityLevel": 1200, + "compatibilityLevel": 1400, "model": { "culture": "en-US", "dataSources": [ { - "name": "AdventureWorksDW", - "connectionString": "Provider=SQLNCLI11;Data Source=localhost;Integrated Security=SSPI;Persist Security Info=false;Initial Catalog=AdventureWorksDW", - "impersonationMode": "impersonateServiceAccount", - "annotations": [ - { - "name": "ConnectionEditUISource", - "value": "SqlServer" - } - ] + "type": "structured", + "name": "AdventureWorks", + "connectionDetails": { + "protocol": "tds", + "address": { + "server": "localhost\\SP1", + "database": "AdventureWorksDW" + }, + "authentication": null, + "query": null + }, + "options": {}, + "credential": { + "AuthenticationKind": "ServiceAccount", + "kind": "SQL", + "path": "localhost\\sp1", + "EncryptConnection": false + } } ], "tables": [ + { + "name": "Internet Sales", + "columns": [ + { + "name": "ProductKey", + "dataType": "int64", + "sourceColumn": "ProductKey" + }, + { + "name": "OrderDateKey", + "dataType": "int64", + "sourceColumn": "OrderDateKey" + }, + { + "name": "DueDateKey", + "dataType": "int64", + "sourceColumn": "DueDateKey" + }, + { + "name": "ShipDateKey", + "dataType": "int64", + "sourceColumn": "ShipDateKey" + }, + { + "name": "CustomerKey", + "dataType": "int64", + "sourceColumn": "CustomerKey" + }, + { + "name": "PromotionKey", + "dataType": "int64", + "sourceColumn": "PromotionKey" + }, + { + "name": "CurrencyKey", + "dataType": "int64", + "sourceColumn": "CurrencyKey" + }, + { + "name": "SalesTerritoryKey", + "dataType": "int64", + "sourceColumn": "SalesTerritoryKey" + }, + { + "name": "SalesOrderNumber", + "dataType": "string", + "sourceColumn": "SalesOrderNumber" + }, + { + "name": "SalesOrderLineNumber", + "dataType": "int64", + "sourceColumn": "SalesOrderLineNumber" + }, + { + "name": "RevisionNumber", + "dataType": "int64", + "sourceColumn": "RevisionNumber" + }, + { + "name": "OrderQuantity", + "dataType": "int64", + "sourceColumn": "OrderQuantity" + }, + { + "name": "UnitPrice", + "dataType": "decimal", + "sourceColumn": "UnitPrice" + }, + { + "name": "ExtendedAmount", + "dataType": "decimal", + "sourceColumn": "ExtendedAmount" + }, + { + "name": "UnitPriceDiscountPct", + "dataType": "double", + "sourceColumn": "UnitPriceDiscountPct" + }, + { + "name": "DiscountAmount", + "dataType": "double", + "sourceColumn": "DiscountAmount" + }, + { + "name": "ProductStandardCost", + "dataType": "decimal", + "sourceColumn": "ProductStandardCost" + }, + { + "name": "TotalProductCost", + "dataType": "decimal", + "sourceColumn": "TotalProductCost" + }, + { + "name": "SalesAmount", + "dataType": "decimal", + "sourceColumn": "SalesAmount" + }, + { + "name": "TaxAmt", + "dataType": "decimal", + "sourceColumn": "TaxAmt" + }, + { + "name": "Freight", + "dataType": "decimal", + "sourceColumn": "Freight" + }, + { + "name": "CarrierTrackingNumber", + "dataType": "string", + "sourceColumn": "CarrierTrackingNumber" + }, + { + "name": "CustomerPONumber", + "dataType": "string", + "sourceColumn": "CustomerPONumber" + }, + { + "name": "OrderDate", + "dataType": "dateTime", + "sourceColumn": "OrderDate", + "variations": [ + { + "name": "Calendar Reuse", + "description": "Show Calendar hierarchy as field in Internet Sales", + "relationship": "ae49b4e7-772e-4fde-a7e4-3f5f80915766", + "defaultHierarchy": { + "table": "Date", + "hierarchy": "Calendar" + }, + "isDefault": true + } + ] + }, + { + "name": "DueDate", + "dataType": "dateTime", + "sourceColumn": "DueDate" + }, + { + "name": "ShipDate", + "dataType": "dateTime", + "sourceColumn": "ShipDate" + }, + { + "type": "calculated", + "name": "Margin", + "dataType": "decimal", + "isDataTypeInferred": true, + "expression": "[SalesAmount]-[TotalProductCost]", + "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + } + ], + "partitions": [ + { + "name": "Internet Sales", + "source": { + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_FactInternetSales = Source{[Schema=\"dbo\",Item=\"FactInternetSales\"]}[Data]", + "in", + " dbo_FactInternetSales" + ] + }, + "annotations": [ + { + "name": "QueryEditorSerialization", + "value": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_FactInternetSales = Source{[Schema=\"dbo\",Item=\"FactInternetSales\"]}[Data]", + "in", + " dbo_FactInternetSalesText]]>" + ] + } + ] + } + ], + "measures": [ + { + "name": "InternetDistinctCountSalesOrder", + "expression": "DISTINCTCOUNT([SalesOrderNumber])", + "formatString": "#,0", + "detailRowsDefinition": {} + }, + { + "name": "InternetOrderLinesCount", + "expression": "COUNTA([SalesOrderLineNumber])", + "formatString": "#,0", + "detailRowsDefinition": {} + }, + { + "name": "InternetTotalUnits", + "expression": "SUM([OrderQuantity])", + "formatString": "#,0", + "detailRowsDefinition": {} + }, + { + "name": "InternetTotalDiscountAmount", + "expression": "SUM([DiscountAmount])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetTotalProductCost", + "expression": "SUM([TotalProductCost])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetTotalSales", + "expression": "SUM([SalesAmount])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetTotalTaxAmt", + "expression": "SUM([TaxAmt])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetTotalFreight", + "expression": "SUM([Freight])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetTotalMargin", + "expression": "SUM([Margin])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetCurrentQuarterSalesPerformance", + "expression": "IFERROR([InternetCurrentQuarterSales]/[InternetPreviousQuarterSalesProportionToQTD],BLANK())", + "kpi": { + "targetExpression": "1.1", + "statusGraphic": "Shapes", + "statusExpression": [ + "var x='Internet Sales'[InternetCurrentQuarterSalesPerformance] return", + " if(ISBLANK(x),BLANK(),", + " If(x<1,-1,", + "\t If(x<1.07,0,1)", + " )", + " )", + " " + ], + "annotations": [ + { + "name": "GoalType", + "value": "StaticValue" + }, + { + "name": "KpiStatusType", + "value": "Linear" + }, + { + "name": "KpiThresholdType", + "value": "Absolute" + }, + { + "name": "KpiThresholdOrdering", + "value": "Ascending" + }, + { + "name": "KpiThresholdCount", + "value": "2" + }, + { + "name": "KpiThreshold_0", + "value": "1" + }, + { + "name": "KpiThreshold_1", + "value": "1.07" + } + ] + }, + "detailRowsDefinition": {} + }, + { + "name": "InternetPreviousQuarterMargin", + "expression": "CALCULATE([InternetTotalMargin],PREVIOUSQUARTER('Date'[Date]))", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetCurrentQuarterMargin", + "expression": "TOTALQTD([InternetTotalMargin],'Date'[Date])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetPreviousQuarterMarginProportionToQTD", + "expression": "[InternetPreviousQuarterMargin]*([DaysCurrentQuarterToDate]/[DaysInCurrentQuarter])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetPreviousQuarterSales", + "expression": "CALCULATE([InternetTotalSales],PREVIOUSQUARTER('Date'[Date]))", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetCurrentQuarterSales", + "expression": "TOTALQTD([InternetTotalSales],'Date'[Date])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetPreviousQuarterSalesProportionToQTD", + "expression": "[InternetPreviousQuarterSales]*([DaysCurrentQuarterToDate]/[DaysInCurrentQuarter])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + }, + { + "name": "InternetCurrentQuarterMarginPerformance", + "expression": "IF([InternetPreviousQuarterMarginProportionToQTD]<>0,([InternetCurrentQuarterMargin]-[InternetPreviousQuarterMarginProportionToQTD])/[InternetPreviousQuarterMarginProportionToQTD],BLANK())", + "kpi": { + "targetExpression": "1.25", + "statusGraphic": "Shapes", + "statusExpression": [ + "var x='Internet Sales'[InternetCurrentQuarterMarginPerformance] return", + " if(ISBLANK(x),BLANK(),", + " If(x<0.8,-1,", + "\t If(x<1.03,0,1)", + " )", + " )", + " " + ], + "annotations": [ + { + "name": "GoalType", + "value": "StaticValue" + }, + { + "name": "KpiStatusType", + "value": "Linear" + }, + { + "name": "KpiThresholdType", + "value": "Absolute" + }, + { + "name": "KpiThresholdOrdering", + "value": "Ascending" + }, + { + "name": "KpiThresholdCount", + "value": "2" + }, + { + "name": "KpiThreshold_0", + "value": "0.8" + }, + { + "name": "KpiThreshold_1", + "value": "1.03" + } + ] + }, + "detailRowsDefinition": {} + }, + { + "name": "YTD InternetTotalSales", + "expression": "CALCULATE([InternetTotalSales], DATESYTD('Date'[Date]))", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] + } + ] + }, { "name": "Customer", "columns": [ { - "name": "Customer Id", + "name": "CustomerKey", + "dataType": "int64", + "sourceColumn": "CustomerKey" + }, + { + "name": "GeographyKey", + "dataType": "int64", + "sourceColumn": "GeographyKey" + }, + { + "name": "CustomerAlternateKey", "dataType": "string", "sourceColumn": "CustomerAlternateKey" }, @@ -31,32 +510,32 @@ "sourceColumn": "Title" }, { - "name": "First Name", + "name": "FirstName", "dataType": "string", "sourceColumn": "FirstName" }, { - "name": "Middle Name", + "name": "MiddleName", "dataType": "string", "sourceColumn": "MiddleName" }, { - "name": "Last Name", + "name": "LastName", "dataType": "string", "sourceColumn": "LastName" }, { - "name": "Name Style", + "name": "NameStyle", "dataType": "boolean", "sourceColumn": "NameStyle" }, { - "name": "Birth Date", + "name": "BirthDate", "dataType": "dateTime", "sourceColumn": "BirthDate" }, { - "name": "Marital Status", + "name": "MaritalStatus", "dataType": "string", "sourceColumn": "MaritalStatus" }, @@ -71,130 +550,99 @@ "sourceColumn": "Gender" }, { - "name": "Email Address", + "name": "EmailAddress", "dataType": "string", "sourceColumn": "EmailAddress" }, { - "name": "Yearly Income", + "name": "YearlyIncome", "dataType": "decimal", - "sourceColumn": "YearlyIncome", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] + "sourceColumn": "YearlyIncome" }, { - "name": "Total Children", + "name": "TotalChildren", "dataType": "int64", - "sourceColumn": "TotalChildren", - "summarizeBy": "none" + "sourceColumn": "TotalChildren" }, { - "name": "Number of Children At Home", + "name": "NumberChildrenAtHome", "dataType": "int64", - "sourceColumn": "NumberChildrenAtHome", - "summarizeBy": "none" + "sourceColumn": "NumberChildrenAtHome" }, { - "name": "Education", + "name": "EnglishEducation", "dataType": "string", "sourceColumn": "EnglishEducation" }, { - "name": "Occupation", + "name": "EnglishOccupation", "dataType": "string", "sourceColumn": "EnglishOccupation" }, { - "name": "Owns House", - "dataType": "boolean", - "sourceColumn": "HouseOwnerFlag", - "formatString": "\"TRUE\";\"TRUE\";\"FALSE\"" + "name": "HouseOwnerFlag", + "dataType": "string", + "sourceColumn": "HouseOwnerFlag" }, { - "name": "Address Line 1", + "name": "NumberCarsOwned", + "dataType": "int64", + "sourceColumn": "NumberCarsOwned" + }, + { + "name": "AddressLine1", "dataType": "string", "sourceColumn": "AddressLine1" }, { - "name": "Address Line 2", + "name": "AddressLine2", "dataType": "string", "sourceColumn": "AddressLine2" }, - { - "name": "Date Of First Purchase", - "dataType": "dateTime", - "sourceColumn": "DateFirstPurchase" - }, - { - "name": "Commute Distance", - "dataType": "string", - "sourceColumn": "CommuteDistance" - }, - { - "name": "CustomerKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "CustomerKey" - }, - { - "name": "GeographyKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "GeographyKey" - }, - { - "name": "Total Cars Owned", - "dataType": "int64", - "sourceColumn": "NumberCarsOwned", - "summarizeBy": "none" - }, { "name": "Phone", "dataType": "string", "sourceColumn": "Phone" + }, + { + "name": "DateFirstPurchase", + "dataType": "dateTime", + "sourceColumn": "DateFirstPurchase" + }, + { + "name": "CommuteDistance", + "dataType": "string", + "sourceColumn": "CommuteDistance" } ], "partitions": [ { - "name": "Customer", + "name": "DimCustomer", + "dataView": "full", "source": { - "query": "SELECT [dbo].[DimCustomer].* \t\tFROM [dbo].[DimCustomer]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization" - }, - { - "name": "QueryEditorSerialization" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimCustomer" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimCustomer].* FROM [dbo].[DimCustomer] " + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimCustomer = Source{[Schema=\"dbo\",Item=\"DimCustomer\"]}[Data],", + " #\"Removed Columns\" = Table.RemoveColumns(dbo_DimCustomer,{\"SpanishEducation\", \"FrenchEducation\", \"SpanishOccupation\", \"FrenchOccupation\"})", + "in", + " #\"Removed Columns\"" + ] + } } ] }, { "name": "Date", + "showAsVariationsOnly": true, "dataCategory": "Time", "columns": [ + { + "name": "DateKey", + "dataType": "int64", + "sourceColumn": "DateKey" + }, { "name": "Date", "dataType": "dateTime", @@ -202,116 +650,99 @@ "sourceColumn": "FullDateAlternateKey" }, { - "name": "Day Number Of Week", + "name": "DayNumberOfWeek", "dataType": "int64", - "sourceColumn": "DayNumberOfWeek", - "summarizeBy": "none" + "sourceColumn": "DayNumberOfWeek" }, { - "name": "Day Of Month", - "dataType": "int64", - "sourceColumn": "DayNumberOfMonth", - "summarizeBy": "none" + "name": "EnglishDayNameOfWeek", + "dataType": "string", + "sourceColumn": "EnglishDayNameOfWeek" }, { - "name": "Day Of Year", + "name": "DayNumberOfMonth", "dataType": "int64", - "sourceColumn": "DayNumberOfYear", - "summarizeBy": "none" + "sourceColumn": "DayNumberOfMonth" }, { - "name": "Month Name", + "name": "DayNumberOfYear", + "dataType": "int64", + "sourceColumn": "DayNumberOfYear" + }, + { + "name": "WeekNumberOfYear", + "dataType": "int64", + "sourceColumn": "WeekNumberOfYear" + }, + { + "name": "EnglishMonthName", "dataType": "string", "sourceColumn": "EnglishMonthName", - "sortByColumn": "Month" + "sortByColumn": "MonthNumberOfYear" }, { - "name": "Month", + "name": "MonthNumberOfYear", "dataType": "int64", - "sourceColumn": "MonthNumberOfYear", - "summarizeBy": "none" + "sourceColumn": "MonthNumberOfYear" }, { - "name": "Calendar Quarter", + "name": "CalendarQuarter", "dataType": "int64", - "sourceColumn": "CalendarQuarter", - "summarizeBy": "none" + "sourceColumn": "CalendarQuarter" }, { - "name": "Calendar Year", + "name": "CalendarYear", "dataType": "int64", - "sourceColumn": "CalendarYear", - "summarizeBy": "none" + "sourceColumn": "CalendarYear" }, { - "name": "Calendar Semester", + "name": "CalendarSemester", "dataType": "int64", - "sourceColumn": "CalendarSemester", - "summarizeBy": "none" + "sourceColumn": "CalendarSemester" }, { - "name": "Fiscal Quarter", + "name": "FiscalQuarter", "dataType": "int64", - "sourceColumn": "FiscalQuarter", - "summarizeBy": "none" + "sourceColumn": "FiscalQuarter" }, { - "name": "Fiscal Year", + "name": "FiscalYear", "dataType": "int64", - "sourceColumn": "FiscalYear", - "summarizeBy": "none" + "sourceColumn": "FiscalYear" }, { - "name": "Fiscal Semester", + "name": "FiscalSemester", "dataType": "int64", - "sourceColumn": "FiscalSemester", - "summarizeBy": "none" - }, - { - "name": "DateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "DateKey", - "summarizeBy": "none" - }, - { - "name": "Day Name Of Week", - "dataType": "string", - "sourceColumn": "EnglishDayNameOfWeek", - "sortByColumn": "Day Number Of Week" - }, - { - "name": "Week Of Year", - "dataType": "int64", - "sourceColumn": "WeekNumberOfYear", - "summarizeBy": "none" + "sourceColumn": "FiscalSemester" } ], "partitions": [ { - "name": "Date", + "name": "DimDate", + "dataView": "full", "source": { - "query": "SELECT [dbo].[DimDate].* \t\tFROM [dbo].[DimDate]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization" - }, - { - "name": "QueryEditorSerialization" - } - ] + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimDate = Source{[Schema=\"dbo\",Item=\"DimDate\"]}[Data],", + " #\"Removed Columns\" = Table.RemoveColumns(dbo_DimDate,{\"SpanishDayNameOfWeek\", \"FrenchDayNameOfWeek\", \"SpanishMonthName\", \"FrenchMonthName\"})", + "in", + " #\"Removed Columns\"" + ] + } } ], "measures": [ { - "name": "Days In Current Quarter", - "expression": "COUNTROWS( DATESBETWEEN( 'Date'[Date], STARTOFQUARTER( LASTDATE('Date'[Date])), ENDOFQUARTER('Date'[Date])))" + "name": "DaysCurrentQuarterToDate", + "expression": "COUNTROWS( DATESQTD( 'Date'[Date])) ", + "detailRowsDefinition": {} }, { - "name": "Days In Current Quarter to Date", - "expression": "COUNTROWS( DATESQTD( 'Date'[Date]))" + "name": "DaysInCurrentQuarter", + "expression": "COUNTROWS( DATESBETWEEN( 'Date'[Date], STARTOFQUARTER( LASTDATE('Date'[Date])), ENDOFQUARTER('Date'[Date])))", + "detailRowsDefinition": {} } ], "hierarchies": [ @@ -321,193 +752,39 @@ { "name": "Year", "ordinal": 0, - "column": "Calendar Year" - }, - { - "name": "Semester", - "ordinal": 1, - "column": "Calendar Semester" - }, - { - "name": "Quarter", - "ordinal": 2, - "column": "Calendar Quarter" + "column": "CalendarYear" }, { "name": "Month", - "ordinal": 3, - "column": "Month Name" + "ordinal": 1, + "column": "EnglishMonthName" }, { - "name": "Day", - "ordinal": 4, - "column": "Day Of Month" + "name": "Date", + "ordinal": 2, + "column": "Date" } ] }, { "name": "Fiscal", "levels": [ + { + "name": "FiscalYear", + "ordinal": 0, + "column": "FiscalYear" + }, { "name": "Month", - "ordinal": 3, - "column": "Month Name" - }, - { - "name": "Day", - "ordinal": 4, - "column": "Day Of Month" - }, - { - "name": "Fiscal Year", - "ordinal": 0, - "column": "Fiscal Year" - }, - { - "name": "Fiscal Semester", "ordinal": 1, - "column": "Fiscal Semester" + "column": "EnglishMonthName" }, { - "name": "Fiscal Quarter", + "name": "Date", "ordinal": 2, - "column": "Fiscal Quarter" + "column": "Date" } ] - }, - { - "name": "Production Calendar", - "levels": [ - { - "name": "Year", - "ordinal": 0, - "column": "Calendar Year" - }, - { - "name": "Week", - "ordinal": 1, - "column": "Week Of Year" - }, - { - "name": "Week Day", - "ordinal": 2, - "column": "Day Name Of Week" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimDate" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimDate].* FROM [dbo].[DimDate] " - } - ] - }, - { - "name": "Geography", - "columns": [ - { - "name": "City", - "dataType": "string", - "sourceColumn": "City" - }, - { - "name": "State Province Code", - "dataType": "string", - "sourceColumn": "StateProvinceCode" - }, - { - "name": "State Province Name", - "dataType": "string", - "sourceColumn": "StateProvinceName" - }, - { - "name": "Country Region Code", - "dataType": "string", - "sourceColumn": "CountryRegionCode" - }, - { - "name": "Country Region Name", - "dataType": "string", - "sourceColumn": "EnglishCountryRegionName" - }, - { - "name": "Postal Code", - "dataType": "string", - "sourceColumn": "PostalCode" - }, - { - "name": "GeographyKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "GeographyKey" - }, - { - "name": "SalesTerritoryKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "SalesTerritoryKey" - } - ], - "partitions": [ - { - "name": "Geography", - "source": { - "query": "SELECT [dbo].[DimGeography].* \t\tFROM [dbo].[DimGeography]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization" - }, - { - "name": "QueryEditorSerialization" - } - ] - } - ], - "hierarchies": [ - { - "name": "Geography", - "levels": [ - { - "name": "Country Region", - "ordinal": 0, - "column": "Country Region Name" - }, - { - "name": "State Province", - "ordinal": 1, - "column": "State Province Name" - }, - { - "name": "City", - "ordinal": 2, - "column": "City" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimGeography" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimGeography].* FROM [dbo].[DimGeography] " } ] }, @@ -515,37 +792,44 @@ "name": "Product", "columns": [ { - "name": "Product Id", + "name": "ProductKey", + "dataType": "int64", + "sourceColumn": "ProductKey" + }, + { + "name": "ProductAlternateKey", "dataType": "string", "sourceColumn": "ProductAlternateKey" }, { - "name": "Weight Unit Code", + "name": "ProductSubcategoryKey", + "dataType": "int64", + "sourceColumn": "ProductSubcategoryKey" + }, + { + "name": "WeightUnitMeasureCode", "dataType": "string", "sourceColumn": "WeightUnitMeasureCode" }, { - "name": "Size Unit Code", + "name": "SizeUnitMeasureCode", "dataType": "string", "sourceColumn": "SizeUnitMeasureCode" }, { - "name": "Product Name", + "name": "EnglishProductName", "dataType": "string", - "sourceColumn": "EnglishProductName", - "isDefaultLabel": true + "sourceColumn": "EnglishProductName" }, { - "name": "Standard Cost", + "name": "StandardCost", "dataType": "decimal", - "sourceColumn": "StandardCost", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] + "sourceColumn": "StandardCost" + }, + { + "name": "FinishedGoodsFlag", + "dataType": "boolean", + "sourceColumn": "FinishedGoodsFlag" }, { "name": "Color", @@ -553,28 +837,19 @@ "sourceColumn": "Color" }, { - "name": "Safety Stock Level", + "name": "SafetyStockLevel", "dataType": "int64", - "sourceColumn": "SafetyStockLevel", - "summarizeBy": "none" + "sourceColumn": "SafetyStockLevel" }, { - "name": "Reorder Point", + "name": "ReorderPoint", "dataType": "int64", - "sourceColumn": "ReorderPoint", - "summarizeBy": "none" + "sourceColumn": "ReorderPoint" }, { - "name": "List Price", + "name": "ListPrice", "dataType": "decimal", - "sourceColumn": "ListPrice", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] + "sourceColumn": "ListPrice" }, { "name": "Size", @@ -582,37 +857,29 @@ "sourceColumn": "Size" }, { - "name": "Size Range", + "name": "SizeRange", "dataType": "string", "sourceColumn": "SizeRange" }, { "name": "Weight", "dataType": "double", - "sourceColumn": "Weight", - "summarizeBy": "none" + "sourceColumn": "Weight" }, { - "name": "Days To Manufacture", + "name": "DaysToManufacture", "dataType": "int64", "sourceColumn": "DaysToManufacture" }, { - "name": "Product Line", + "name": "ProductLine", "dataType": "string", "sourceColumn": "ProductLine" }, { - "name": "Dealer Price", + "name": "DealerPrice", "dataType": "decimal", - "sourceColumn": "DealerPrice", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] + "sourceColumn": "DealerPrice" }, { "name": "Class", @@ -625,279 +892,424 @@ "sourceColumn": "Style" }, { - "name": "Model Name", + "name": "ModelName", "dataType": "string", "sourceColumn": "ModelName" }, { - "name": "Description", + "name": "EnglishDescription", "dataType": "string", "sourceColumn": "EnglishDescription" }, { - "name": "Product Start Date", + "name": "StartDate", "dataType": "dateTime", "sourceColumn": "StartDate" }, { - "name": "Product End Date", + "name": "EndDate", "dataType": "dateTime", "sourceColumn": "EndDate" }, { - "name": "Product Status", + "name": "Status", "dataType": "string", "sourceColumn": "Status" }, { "type": "calculated", - "name": "Product SubCategory Name", + "name": "ProductSubCategoryName", "dataType": "string", "isDataTypeInferred": true, - "expression": "RELATED('Product SubCategory'[Product Subcategory Name])" + "expression": "RELATED('Product Subcategory'[EnglishProductSubcategoryName]) " }, { "type": "calculated", - "name": "Product Category Name", + "name": "ProductCategoryName", "dataType": "string", "isDataTypeInferred": true, - "expression": "RELATED('Product Category'[Product Category Name])" - }, - { - "name": "ProductKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductKey" - }, - { - "name": "ProductSubcategoryKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductSubcategoryKey" - }, - { - "name": "Is Finished Goods", - "dataType": "boolean", - "sourceColumn": "FinishedGoodsFlag" - }, - { - "name": "LargePhoto", - "dataType": "binary", - "sourceColumn": "LargePhoto", - "isDefaultImage": true + "expression": "RELATED('Product Category'[EnglishProductCategoryName]) " } ], "partitions": [ { - "name": "Product", + "name": "DimProduct", + "dataView": "full", "source": { - "query": "SELECT [dbo].[DimProduct].* \t\tFROM [dbo].[DimProduct]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization" - }, - { - "name": "QueryEditorSerialization" - } - ] + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimProduct = Source{[Schema=\"dbo\",Item=\"DimProduct\"]}[Data],", + " #\"Removed Columns\" = Table.RemoveColumns(dbo_DimProduct,{\"SpanishProductName\", \"FrenchProductName\", \"FrenchDescription\", \"ChineseDescription\", \"ArabicDescription\", \"HebrewDescription\", \"ThaiDescription\", \"GermanDescription\", \"JapaneseDescription\", \"TurkishDescription\"})", + "in", + " #\"Removed Columns\"" + ] + } } ], "hierarchies": [ { "name": "Category", "levels": [ + { + "name": "Product", + "ordinal": 3, + "column": "EnglishProductName" + }, { "name": "Category", "ordinal": 0, - "column": "Product Category Name" + "column": "ProductCategoryName" }, { "name": "SubCategory", "ordinal": 1, - "column": "Product SubCategory Name" + "column": "ProductSubCategoryName" }, { "name": "Model", "ordinal": 2, - "column": "Model Name" - }, - { - "name": "Product", - "ordinal": 3, - "column": "Product Name" + "column": "ModelName" } ] } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimProduct" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimProduct].* FROM [dbo].[DimProduct] " - } ] }, { - "name": "Product Category", + "name": "Geography", "columns": [ { - "name": "Product Category Name", - "dataType": "string", - "sourceColumn": "EnglishProductCategoryName" + "name": "GeographyKey", + "dataType": "int64", + "sourceColumn": "GeographyKey" }, { - "name": "ProductCategoryKey", + "name": "City", + "dataType": "string", + "sourceColumn": "City" + }, + { + "name": "StateProvinceCode", + "dataType": "string", + "sourceColumn": "StateProvinceCode" + }, + { + "name": "StateProvince", + "dataType": "string", + "sourceColumn": "StateProvinceName" + }, + { + "name": "CountryCode", + "dataType": "string", + "sourceColumn": "CountryRegionCode" + }, + { + "name": "Country", + "dataType": "string", + "sourceColumn": "EnglishCountryRegionName" + }, + { + "name": "PostalCode", + "dataType": "string", + "sourceColumn": "PostalCode" + }, + { + "name": "SalesTerritoryKey", "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductCategoryKey", - "summarizeBy": "none" + "sourceColumn": "SalesTerritoryKey" + }, + { + "name": "IpAddressLocator", + "dataType": "string", + "sourceColumn": "IpAddressLocator" } ], "partitions": [ { - "name": "Product Category", + "name": "DimGeography", "source": { - "query": "SELECT [dbo].[DimProductCategory].* \t\tFROM [dbo].[DimProductCategory]", - "dataSource": "AdventureWorksDW" + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimGeography = Source{[Schema=\"dbo\",Item=\"DimGeography\"]}[Data]", + "in", + " dbo_DimGeography" + ] }, "annotations": [ { - "name": "TableWidgetSerialization" - }, - { - "name": "QueryEditorSerialization" + "name": "QueryEditorSerialization", + "value": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimGeography = Source{[Schema=\"dbo\",Item=\"DimGeography\"]}[Data]", + "in", + " dbo_DimGeographyText]]>" + ] } ] } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimProductCategory" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimProductCategory].* FROM [dbo].[DimProductCategory] " - } ] }, { "name": "Product Subcategory", "columns": [ { - "name": "Product Subcategory Name", + "name": "ProductSubcategoryKey", + "dataType": "int64", + "sourceColumn": "ProductSubcategoryKey" + }, + { + "name": "ProductSubcategoryAlternateKey", + "dataType": "int64", + "sourceColumn": "ProductSubcategoryAlternateKey" + }, + { + "name": "EnglishProductSubcategoryName", "dataType": "string", "sourceColumn": "EnglishProductSubcategoryName" }, - { - "name": "ProductSubcategoryKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductSubcategoryKey", - "summarizeBy": "none" - }, { "name": "ProductCategoryKey", "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductCategoryKey", - "summarizeBy": "none" + "sourceColumn": "ProductCategoryKey" } ], "partitions": [ { - "name": "Product Subcategory", + "name": "DimProductSubcategory", + "dataView": "full", "source": { - "query": "SELECT [dbo].[DimProductSubcategory].* \t\tFROM [dbo].[DimProductSubcategory]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization" - }, - { - "name": "QueryEditorSerialization" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimProductSubcategory" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimProductSubcategory].* FROM [dbo].[DimProductSubcategory] " + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimProductSubcategory = Source{[Schema=\"dbo\",Item=\"DimProductSubcategory\"]}[Data],", + " #\"Removed Columns\" = Table.RemoveColumns(dbo_DimProductSubcategory,{\"SpanishProductSubcategoryName\", \"FrenchProductSubcategoryName\"})", + "in", + " #\"Removed Columns\"" + ] + } } ] }, { - "name": "Currency", + "name": "Product Category", "columns": [ { - "name": "CurrencyKey", + "name": "ProductCategoryKey", "dataType": "int64", - "isHidden": true, - "sourceColumn": "CurrencyKey" + "sourceColumn": "ProductCategoryKey" }, { - "name": "Currency Code", - "dataType": "string", - "sourceColumn": "CurrencyAlternateKey" + "name": "ProductCategoryAlternateKey", + "dataType": "int64", + "sourceColumn": "ProductCategoryAlternateKey" }, { - "name": "CurrencyName", + "name": "EnglishProductCategoryName", "dataType": "string", - "sourceColumn": "CurrencyName" + "sourceColumn": "EnglishProductCategoryName" } ], "partitions": [ { - "name": "Currency", + "name": "DimProductCategory", + "dataView": "full", "source": { - "query": "SELECT [dbo].[DimCurrency].* \t\tFROM [dbo].[DimCurrency]", - "dataSource": "AdventureWorksDW" + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimProductCategory = Source{[Schema=\"dbo\",Item=\"DimProductCategory\"]}[Data],", + " #\"Removed Columns\" = Table.RemoveColumns(dbo_DimProductCategory,{\"SpanishProductCategoryName\", \"FrenchProductCategoryName\"})", + "in", + " #\"Removed Columns\"" + ] + } + } + ] + }, + { + "name": "Reseller Sales", + "columns": [ + { + "name": "ProductKey", + "dataType": "int64", + "sourceColumn": "ProductKey" + }, + { + "name": "OrderDateKey", + "dataType": "int64", + "sourceColumn": "OrderDateKey" + }, + { + "name": "DueDateKey", + "dataType": "int64", + "sourceColumn": "DueDateKey" + }, + { + "name": "ShipDateKey", + "dataType": "int64", + "sourceColumn": "ShipDateKey" + }, + { + "name": "ResellerKey", + "dataType": "int64", + "sourceColumn": "ResellerKey" + }, + { + "name": "EmployeeKey", + "dataType": "int64", + "sourceColumn": "EmployeeKey" + }, + { + "name": "PromotionKey", + "dataType": "int64", + "sourceColumn": "PromotionKey" + }, + { + "name": "CurrencyKey", + "dataType": "int64", + "sourceColumn": "CurrencyKey" + }, + { + "name": "SalesTerritoryKey", + "dataType": "int64", + "sourceColumn": "SalesTerritoryKey" + }, + { + "name": "SalesOrderNumber", + "dataType": "string", + "sourceColumn": "SalesOrderNumber" + }, + { + "name": "SalesOrderLineNumber", + "dataType": "int64", + "sourceColumn": "SalesOrderLineNumber" + }, + { + "name": "RevisionNumber", + "dataType": "int64", + "sourceColumn": "RevisionNumber" + }, + { + "name": "OrderQuantity", + "dataType": "int64", + "sourceColumn": "OrderQuantity" + }, + { + "name": "UnitPrice", + "dataType": "decimal", + "sourceColumn": "UnitPrice" + }, + { + "name": "ExtendedAmount", + "dataType": "decimal", + "sourceColumn": "ExtendedAmount" + }, + { + "name": "UnitPriceDiscountPct", + "dataType": "double", + "sourceColumn": "UnitPriceDiscountPct" + }, + { + "name": "DiscountAmount", + "dataType": "double", + "sourceColumn": "DiscountAmount" + }, + { + "name": "ProductStandardCost", + "dataType": "decimal", + "sourceColumn": "ProductStandardCost" + }, + { + "name": "TotalProductCost", + "dataType": "decimal", + "sourceColumn": "TotalProductCost" + }, + { + "name": "SalesAmount", + "dataType": "decimal", + "sourceColumn": "SalesAmount" + }, + { + "name": "TaxAmt", + "dataType": "decimal", + "sourceColumn": "TaxAmt" + }, + { + "name": "Freight", + "dataType": "decimal", + "sourceColumn": "Freight" + }, + { + "name": "CarrierTrackingNumber", + "dataType": "string", + "sourceColumn": "CarrierTrackingNumber" + }, + { + "name": "CustomerPONumber", + "dataType": "string", + "sourceColumn": "CustomerPONumber" + }, + { + "name": "OrderDate", + "dataType": "dateTime", + "sourceColumn": "OrderDate" + }, + { + "name": "DueDate", + "dataType": "dateTime", + "sourceColumn": "DueDate" + }, + { + "name": "ShipDate", + "dataType": "dateTime", + "sourceColumn": "ShipDate" + } + ], + "partitions": [ + { + "name": "Reseller Sales", + "source": { + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_FactResellerSales = Source{[Schema=\"dbo\",Item=\"FactResellerSales\"]}[Data]", + "in", + " dbo_FactResellerSales" + ] }, "annotations": [ { - "name": "QueryEditorSerialization" - }, - { - "name": "TableWidgetSerialization" + "name": "QueryEditorSerialization", + "value": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_FactResellerSales = Source{[Schema=\"dbo\",Item=\"FactResellerSales\"]}[Data]", + "in", + " dbo_FactResellerSalesText]]>" + ] } ] } ], - "annotations": [ + "measures": [ { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimCurrency" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimCurrency].* FROM [dbo].[DimCurrency] " + "name": "ResellerTotalSales", + "expression": "SUM([SalesAmount])", + "formatString": "\\$#,0;(\\$#,0);\\$#,0", + "detailRowsDefinition": {}, + "annotations": [ + { + "name": "Format", + "value": "" + } + ] } ] }, @@ -907,40 +1319,40 @@ { "name": "EmployeeKey", "dataType": "int64", - "isHidden": true, - "sourceColumn": "EmployeeKey", - "summarizeBy": "none" + "sourceColumn": "EmployeeKey" }, { "name": "ParentEmployeeKey", "dataType": "int64", - "isHidden": true, - "sourceColumn": "ParentEmployeeKey", - "summarizeBy": "none" + "sourceColumn": "ParentEmployeeKey" }, { - "name": "Employee Id", + "name": "EmployeeNationalIDAlternateKey", "dataType": "string", "sourceColumn": "EmployeeNationalIDAlternateKey" }, + { + "name": "ParentEmployeeNationalIDAlternateKey", + "dataType": "string", + "sourceColumn": "ParentEmployeeNationalIDAlternateKey" + }, { "name": "SalesTerritoryKey", "dataType": "int64", - "isHidden": true, "sourceColumn": "SalesTerritoryKey" }, { - "name": "First Name", + "name": "FirstName", "dataType": "string", "sourceColumn": "FirstName" }, { - "name": "Last Name", + "name": "LastName", "dataType": "string", "sourceColumn": "LastName" }, { - "name": "Middle Name", + "name": "MiddleName", "dataType": "string", "sourceColumn": "MiddleName" }, @@ -955,22 +1367,22 @@ "sourceColumn": "Title" }, { - "name": "Hire Date", + "name": "HireDate", "dataType": "dateTime", "sourceColumn": "HireDate" }, { - "name": "Birth Date", + "name": "BirthDate", "dataType": "dateTime", "sourceColumn": "BirthDate" }, { - "name": "Login", + "name": "LoginID", "dataType": "string", "sourceColumn": "LoginID" }, { - "name": "Email", + "name": "EmailAddress", "dataType": "string", "sourceColumn": "EmailAddress" }, @@ -980,22 +1392,22 @@ "sourceColumn": "Phone" }, { - "name": "Marital Status", + "name": "MaritalStatus", "dataType": "string", "sourceColumn": "MaritalStatus" }, { - "name": "Emergency Contact Name", + "name": "EmergencyContactName", "dataType": "string", "sourceColumn": "EmergencyContactName" }, { - "name": "Emergency Contact Phone", + "name": "EmergencyContactPhone", "dataType": "string", "sourceColumn": "EmergencyContactPhone" }, { - "name": "Is Salaried", + "name": "SalariedFlag", "dataType": "boolean", "sourceColumn": "SalariedFlag" }, @@ -1005,56 +1417,47 @@ "sourceColumn": "Gender" }, { - "name": "Pay Frequency", + "name": "PayFrequency", "dataType": "int64", - "sourceColumn": "PayFrequency", - "summarizeBy": "none" + "sourceColumn": "PayFrequency" }, { - "name": "Base Rate", + "name": "BaseRate", "dataType": "decimal", - "sourceColumn": "BaseRate", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] + "sourceColumn": "BaseRate" }, { - "name": "Vacation Hours", + "name": "VacationHours", "dataType": "int64", - "sourceColumn": "VacationHours", - "summarizeBy": "none" + "sourceColumn": "VacationHours" }, { - "name": "Sick Leave Hours", + "name": "SickLeaveHours", "dataType": "int64", - "sourceColumn": "SickLeaveHours", - "summarizeBy": "none" + "sourceColumn": "SickLeaveHours" }, { - "name": "Is Current", + "name": "CurrentFlag", "dataType": "boolean", "sourceColumn": "CurrentFlag" }, { - "name": "Is Sales Person", + "name": "SalesPersonFlag", "dataType": "boolean", "sourceColumn": "SalesPersonFlag" }, { - "name": "Department Name", + "name": "DepartmentName", "dataType": "string", "sourceColumn": "DepartmentName" }, { - "name": "Start Date", + "name": "StartDate", "dataType": "dateTime", "sourceColumn": "StartDate" }, { - "name": "End Date", + "name": "EndDate", "dataType": "dateTime", "sourceColumn": "EndDate" }, @@ -1064,3595 +1467,307 @@ "sourceColumn": "Status" }, { - "name": "Employee Photo", - "dataType": "binary", - "sourceColumn": "EmployeePhoto", - "isDefaultImage": true + "type": "calculated", + "name": "FullName", + "dataType": "string", + "isDataTypeInferred": true, + "expression": "[FirstName] & \" \" & [MiddleName] & \" \" & [LastName]" + }, + { + "type": "calculated", + "name": "Path", + "dataType": "string", + "isDataTypeInferred": true, + "expression": "PATH([EmployeeKey],[ParentEmployeeKey])" + }, + { + "type": "calculated", + "name": "Level1", + "dataType": "string", + "isDataTypeInferred": true, + "expression": "LOOKUPVALUE(Employee[FullName],Employee[EmployeeKey],PATHITEM([Path],1,1))" + }, + { + "type": "calculated", + "name": "Level2", + "dataType": "string", + "isDataTypeInferred": true, + "expression": [ + "LOOKUPVALUE(", + " Employee[FullName],", + " Employee[EmployeeKey],", + " PATHITEM([Path],2,1)", + ")" + ] + }, + { + "type": "calculated", + "name": "Level3", + "dataType": "string", + "isDataTypeInferred": true, + "expression": "LOOKUPVALUE(Employee[FullName],Employee[EmployeeKey],PATHITEM([Path],3,1))" + }, + { + "type": "calculated", + "name": "Level4", + "dataType": "string", + "isDataTypeInferred": true, + "expression": "LOOKUPVALUE(Employee[FullName],Employee[EmployeeKey],PATHITEM([Path],4,1))" + }, + { + "type": "calculated", + "name": "Level5", + "dataType": "string", + "isDataTypeInferred": true, + "expression": "LOOKUPVALUE(Employee[FullName],Employee[EmployeeKey],PATHITEM([Path],5,1))" } ], "partitions": [ { - "name": "Employee", + "name": "DimEmployee", + "dataView": "full", "source": { - "query": "SELECT [dbo].[DimEmployee].* \t\tFROM [dbo].[DimEmployee]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "QueryEditorSerialization" - }, - { - "name": "TableWidgetSerialization" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimEmployee" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimEmployee].* FROM [dbo].[DimEmployee] " - } - ] - }, - { - "name": "Promotion", - "columns": [ - { - "name": "PromotionKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "PromotionKey", - "summarizeBy": "none" - }, - { - "name": "Promotion Name", - "dataType": "string", - "sourceColumn": "EnglishPromotionName" - }, - { - "name": "DiscountPct", - "dataType": "double", - "sourceColumn": "DiscountPct", - "formatString": "0.00", - "summarizeBy": "none" - }, - { - "name": "Promotion Type", - "dataType": "string", - "sourceColumn": "EnglishPromotionType" - }, - { - "name": "Promotion Category", - "dataType": "string", - "sourceColumn": "EnglishPromotionCategory" - }, - { - "name": "Promotion Start Date", - "dataType": "dateTime", - "sourceColumn": "StartDate" - }, - { - "name": "Promotion End Date", - "dataType": "dateTime", - "sourceColumn": "EndDate" - }, - { - "name": "Min Quantity", - "dataType": "int64", - "sourceColumn": "MinQty" - }, - { - "name": "Max Quantity", - "dataType": "int64", - "sourceColumn": "MaxQty" - } - ], - "partitions": [ - { - "name": "Promotion", - "source": { - "query": "SELECT [dbo].[DimPromotion].* \t\tFROM [dbo].[DimPromotion]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "QueryEditorSerialization" - }, - { - "name": "TableWidgetSerialization" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimPromotion" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimPromotion].* FROM [dbo].[DimPromotion] " - } - ] - }, - { - "name": "Reseller", - "columns": [ - { - "name": "ResellerKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ResellerKey" - }, - { - "name": "GeographyKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "GeographyKey" - }, - { - "name": "Reseller Id", - "dataType": "string", - "sourceColumn": "ResellerAlternateKey" - }, - { - "name": "Reseller Phone", - "dataType": "string", - "sourceColumn": "Phone" - }, - { - "name": "Business Type", - "dataType": "string", - "sourceColumn": "BusinessType" - }, - { - "name": "Reseller Name", - "dataType": "string", - "sourceColumn": "ResellerName", - "isDefaultLabel": true - }, - { - "name": "Number Employees", - "dataType": "int64", - "sourceColumn": "NumberEmployees", - "summarizeBy": "none" - }, - { - "name": "Order Frequency", - "dataType": "string", - "sourceColumn": "OrderFrequency" - }, - { - "name": "Order Month", - "dataType": "int64", - "sourceColumn": "OrderMonth" - }, - { - "name": "First Order Year", - "dataType": "int64", - "sourceColumn": "FirstOrderYear", - "summarizeBy": "none" - }, - { - "name": "Last Order Year", - "dataType": "int64", - "sourceColumn": "LastOrderYear", - "summarizeBy": "none" - }, - { - "name": "Product Line", - "dataType": "string", - "sourceColumn": "ProductLine" - }, - { - "name": "Address Line 1", - "dataType": "string", - "sourceColumn": "AddressLine1" - }, - { - "name": "Address Line 2", - "dataType": "string", - "sourceColumn": "AddressLine2" - }, - { - "name": "Annual Sales", - "dataType": "decimal", - "sourceColumn": "AnnualSales", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Bank Name", - "dataType": "string", - "sourceColumn": "BankName" - }, - { - "name": "Min Payment Type", - "dataType": "int64", - "sourceColumn": "MinPaymentType", - "summarizeBy": "none" - }, - { - "name": "Min Payment Amount", - "dataType": "decimal", - "sourceColumn": "MinPaymentAmount", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Annua Revenue", - "dataType": "decimal", - "sourceColumn": "AnnualRevenue", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Year Opened", - "dataType": "int64", - "sourceColumn": "YearOpened", - "summarizeBy": "none" - } - ], - "partitions": [ - { - "name": "Reseller", - "source": { - "query": "SELECT [dbo].[DimReseller].* \t\tFROM [dbo].[DimReseller]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "QueryEditorSerialization" - }, - { - "name": "TableWidgetSerialization" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimReseller" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimReseller].* FROM [dbo].[DimReseller] " - } - ] - }, - { - "name": "Sales Territory", - "columns": [ - { - "name": "SalesTerritoryKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "SalesTerritoryKey" - }, - { - "name": "Sales Territory Region", - "dataType": "string", - "sourceColumn": "SalesTerritoryRegion", - "isDefaultLabel": true - }, - { - "name": "Sales Territory Country", - "dataType": "string", - "sourceColumn": "SalesTerritoryCountry" - }, - { - "name": "Sales Territory Group", - "dataType": "string", - "sourceColumn": "SalesTerritoryGroup" - }, - { - "name": "Sales Territory Image", - "dataType": "binary", - "sourceColumn": "SalesTerritoryImage", - "isDefaultImage": true - } - ], - "partitions": [ - { - "name": "Sales Territory", - "source": { - "query": "SELECT [dbo].[DimSalesTerritory].* \t\tFROM [dbo].[DimSalesTerritory]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "QueryEditorSerialization" - }, - { - "name": "TableWidgetSerialization" - } - ] - } - ], - "measures": [ - { - "name": "Distinct Count Sales Orders", - "expression": "[Reseller Distinct Count Sales Order] + [Internet Distinct Count Sales Order]", - "formatString": "#,0" - }, - { - "name": "Total Sales", - "expression": "[Reseller Total Sales] + [Internet Total Sales]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Discount Amount", - "expression": "[Reseller Total Discount Amount] + [Internet Total Discount Amount]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Products Cost", - "expression": "[Reseller Total Product Cost] + [Internet Total Product Cost]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Tax Amount", - "expression": "[Reseller Total Tax Amount] + [Internet Total Tax Amount]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Freight", - "expression": "[Reseller Total Freight] + [Internet Total Freight]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Gross Profit", - "expression": "[Reseller Total Gross Profit] + [Internet Total Gross Profit]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Units Sold", - "expression": "[Reseller Total Units] + [Internet Total Units]", - "formatString": "#,0" - }, - { - "name": "Order Lines Count", - "expression": "[Reseller Order Lines Count] + [Internet Order Lines Count]", - "formatString": "#,0" - }, - { - "name": "Total Previous Quarter Gross Profit", - "expression": "CALCULATE([Total Gross Profit], PREVIOUSQUARTER('Date'[Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Current Quarter Gross Profit", - "expression": "TOTALQTD([Total Gross Profit],'Date'[Date])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Previous Quarter Gross Profit Proportion to QTD", - "expression": "[Total Previous Quarter Gross Profit]*([Days In Current Quarter to Date]/[Days In Current Quarter])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Previous Quarter Sales", - "expression": "CALCULATE([Total Sales], PREVIOUSQUARTER('Date'[Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Current Quarter Sales", - "expression": "TOTALQTD([Total Sales],'Date'[Date])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Previous Quarter Sales Proportion to QTD", - "expression": "[Total Previous Quarter Sales]*([Days In Current Quarter to Date]/[Days In Current Quarter])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Sales - Sales Territory sliced by Employee", - "expression": "[Reseller Total Sales - Sales Territory sliced by Employee] + [Internet Total Sales]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Current Quarter Sales Performance", - "expression": "IFERROR([Total Current Quarter Sales]/[Total Previous Quarter Sales Proportion to QTD],BLANK())", - "kpi": { - "targetExpression": "1.1", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Sales Territory'[Total Current Quarter Sales Performance]),BLANK(),", - " If('Sales Territory'[Total Current Quarter Sales Performance]<0.8,-1,", - "\t If('Sales Territory'[Total Current Quarter Sales Performance]<1.07,0,1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "Linear" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "0.8" - }, - { - "name": "KpiThreshold_1", - "value": "1.07" - } - ] - } - }, - { - "name": "Total Current Quarter Gross Profit Performance", - "expression": "IF([Total Previous Quarter Gross Profit Proportion to QTD]<>0,([Total Current Quarter Gross Profit]-[Total Previous Quarter Gross Profit Proportion to QTD])/[Total Previous Quarter Gross Profit Proportion to QTD],BLANK())", - "kpi": { - "targetExpression": "1.25", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Sales Territory'[Total Current Quarter Gross Profit Performance]),BLANK(),", - " If('Sales Territory'[Total Current Quarter Gross Profit Performance]<0.8,-1,", - "\t If('Sales Territory'[Total Current Quarter Gross Profit Performance]<1.03,0,1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "Linear" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "0.8" - }, - { - "name": "KpiThreshold_1", - "value": "1.03" - } + "type": "m", + "expression": [ + "let", + " Source = #\"AdventureWorks\",", + " dbo_DimEmployee = Source{[Schema=\"dbo\",Item=\"DimEmployee\"]}[Data]", + "in", + " dbo_DimEmployee" ] } } ], "hierarchies": [ { - "name": "Territory", + "name": "Organization", "levels": [ { - "name": "Group", + "name": "Level1", "ordinal": 0, - "column": "Sales Territory Group" + "column": "Level1" }, { - "name": "Country", + "name": "Level2", "ordinal": 1, - "column": "Sales Territory Country" + "column": "Level2" }, { - "name": "Region", + "name": "Level3", "ordinal": 2, - "column": "Sales Territory Region" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "DimSalesTerritory" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[DimSalesTerritory].* FROM [dbo].[DimSalesTerritory] " - } - ] - }, - { - "name": "Product Inventory", - "columns": [ - { - "name": "ProductKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductKey" - }, - { - "name": "DateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "DateKey" - }, - { - "name": "Movement Date", - "dataType": "dateTime", - "sourceColumn": "MovementDate", - "formatString": "Short Date", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Unit Cost", - "dataType": "decimal", - "sourceColumn": "UnitCost", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Units In", - "dataType": "int64", - "sourceColumn": "UnitsIn" - }, - { - "name": "Units Out", - "dataType": "int64", - "sourceColumn": "UnitsOut" - }, - { - "name": "Units Balance", - "dataType": "int64", - "sourceColumn": "UnitsBalance", - "summarizeBy": "none" - }, - { - "type": "calculated", - "name": "Product-Date Inventory Value", - "dataType": "decimal", - "isDataTypeInferred": true, - "expression": "[Unit Cost]*[Units Balance]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "type": "calculated", - "name": "Product-Date Optimal Inventory Value", - "dataType": "decimal", - "isDataTypeInferred": true, - "expression": "[Unit Cost]*RELATED('Product'[Reorder Point])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "type": "calculated", - "name": "Product-Date Max Inventory Value", - "dataType": "decimal", - "isDataTypeInferred": true, - "expression": "[Unit Cost]*RELATED('Product'[Safety Stock Level])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "type": "calculated", - "name": "Product-Date OverStocked", - "dataType": "int64", - "isDataTypeInferred": true, - "expression": "IF([Units Balance]>RELATED('Product'[Safety Stock Level]),1,0)" - }, - { - "type": "calculated", - "name": "Product-Date UnderStocked", - "dataType": "int64", - "isDataTypeInferred": true, - "expression": "IF([Units Balance]= 20050101) AND ([DateKey] <= 20051231))", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization", - "value": [ - "<?xml version=\"1.0\" encoding=\"UTF-16\"?><Gemini xmlns=\"TableWidgetSerialization\"><AnnotationContent><![CDATA[<?xml version=\"1.0\"?>", - "<TableWidgetGridSerialization xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">", - " <ColumnSuggestedType />", - " <ColumnFormat />", - " <ColumnAccuracy />", - " <ColumnCurrencySymbol />", - " <ColumnPositivePattern />", - " <ColumnNegativePattern />", - " <ColumnWidths>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>105</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>123</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>84</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>92</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>111</int>", - " </value>", - " </item>", - " </ColumnWidths>", - " <ColumnDisplayIndex>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>0</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>1</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>2</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>3</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>4</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>5</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>6</int>", - " </value>", - " </item>", - " </ColumnDisplayIndex>", - " <ColumnFrozen />", - " <ColumnChecked />", - " <ColumnFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <FilterExpression xsi:type=\"LogicalExpression\">", - " <Operator>AND</Operator>", - " <ExpressionList>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>GreaterThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20050101</Value>", - " </FilterExpression>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>LesserThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20051231</Value>", - " </FilterExpression>", - " </ExpressionList>", - " </FilterExpression>", - " </value>", - " </item>", - " </ColumnFilter>", - " <SelectionFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <SelectionFilter xsi:nil=\"true\" />", - " </value>", - " </item>", - " </SelectionFilter>", - " <FilterParameters>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <CommandParameters />", - " </value>", - " </item>", - " </FilterParameters>", - " <IsSortDescending>false</IsSortDescending>", - "</TableWidgetGridSerialization>]]></AnnotationContent></Gemini>" - ] + "column": "Level3" }, { - "name": "TableWidgetSourceTable" + "name": "Level4", + "ordinal": 3, + "column": "Level4" }, { - "name": "QueryEditorSerialization" + "name": "Level5", + "ordinal": 4, + "column": "Level5" } ] - }, - { - "name": "Product Inventory 2006", - "mode": "import", - "source": { - "query": "SELECT [dbo].[FactProductInventory].* \t\tFROM [dbo].[FactProductInventory] WHERE (([DateKey] >= 20060101) AND ([DateKey] <= 20061231))", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization", - "value": [ - "<?xml version=\"1.0\" encoding=\"UTF-16\"?><Gemini xmlns=\"TableWidgetSerialization\"><AnnotationContent><![CDATA[<?xml version=\"1.0\"?>", - "<TableWidgetGridSerialization xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">", - " <ColumnSuggestedType />", - " <ColumnFormat />", - " <ColumnAccuracy />", - " <ColumnCurrencySymbol />", - " <ColumnPositivePattern />", - " <ColumnNegativePattern />", - " <ColumnWidths>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>105</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>123</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>84</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>92</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>111</int>", - " </value>", - " </item>", - " </ColumnWidths>", - " <ColumnDisplayIndex>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>0</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>1</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>2</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>3</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>4</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>5</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>6</int>", - " </value>", - " </item>", - " </ColumnDisplayIndex>", - " <ColumnFrozen />", - " <ColumnChecked />", - " <ColumnFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <FilterExpression xsi:type=\"LogicalExpression\">", - " <Operator>AND</Operator>", - " <ExpressionList>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>GreaterThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20060101</Value>", - " </FilterExpression>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>LesserThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20061231</Value>", - " </FilterExpression>", - " </ExpressionList>", - " </FilterExpression>", - " </value>", - " </item>", - " </ColumnFilter>", - " <SelectionFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <SelectionFilter xsi:nil=\"true\" />", - " </value>", - " </item>", - " </SelectionFilter>", - " <FilterParameters>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <CommandParameters />", - " </value>", - " </item>", - " </FilterParameters>", - " <IsSortDescending>false</IsSortDescending>", - "</TableWidgetGridSerialization>]]></AnnotationContent></Gemini>" - ] - }, - { - "name": "TableWidgetSourceTable" - }, - { - "name": "QueryEditorSerialization" - } - ] - }, - { - "name": "Product Inventory 2007", - "mode": "import", - "source": { - "query": "SELECT [dbo].[FactProductInventory].* \t\tFROM [dbo].[FactProductInventory] WHERE (([DateKey] >= 20070101) AND ([DateKey] <= 20071231))", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization", - "value": [ - "<?xml version=\"1.0\" encoding=\"UTF-16\"?><Gemini xmlns=\"TableWidgetSerialization\"><AnnotationContent><![CDATA[<?xml version=\"1.0\"?>", - "<TableWidgetGridSerialization xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">", - " <ColumnSuggestedType />", - " <ColumnFormat />", - " <ColumnAccuracy />", - " <ColumnCurrencySymbol />", - " <ColumnPositivePattern />", - " <ColumnNegativePattern />", - " <ColumnWidths>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>105</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>123</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>84</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>92</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>111</int>", - " </value>", - " </item>", - " </ColumnWidths>", - " <ColumnDisplayIndex>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>0</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>1</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>2</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>3</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>4</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>5</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>6</int>", - " </value>", - " </item>", - " </ColumnDisplayIndex>", - " <ColumnFrozen />", - " <ColumnChecked />", - " <ColumnFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <FilterExpression xsi:type=\"LogicalExpression\">", - " <Operator>AND</Operator>", - " <ExpressionList>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>GreaterThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20070101</Value>", - " </FilterExpression>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>LesserThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20071231</Value>", - " </FilterExpression>", - " </ExpressionList>", - " </FilterExpression>", - " </value>", - " </item>", - " </ColumnFilter>", - " <SelectionFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <SelectionFilter xsi:nil=\"true\" />", - " </value>", - " </item>", - " </SelectionFilter>", - " <FilterParameters>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <CommandParameters />", - " </value>", - " </item>", - " </FilterParameters>", - " <IsSortDescending>false</IsSortDescending>", - "</TableWidgetGridSerialization>]]></AnnotationContent></Gemini>" - ] - }, - { - "name": "TableWidgetSourceTable" - }, - { - "name": "QueryEditorSerialization" - } - ] - }, - { - "name": "Product Inventory 2008", - "mode": "import", - "source": { - "query": "SELECT [dbo].[FactProductInventory].* \t\tFROM [dbo].[FactProductInventory] WHERE (([DateKey] >= 20080101) AND ([DateKey] <= 20081231))", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization", - "value": [ - "<?xml version=\"1.0\" encoding=\"UTF-16\"?><Gemini xmlns=\"TableWidgetSerialization\"><AnnotationContent><![CDATA[<?xml version=\"1.0\"?>", - "<TableWidgetGridSerialization xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">", - " <ColumnSuggestedType />", - " <ColumnFormat />", - " <ColumnAccuracy />", - " <ColumnCurrencySymbol />", - " <ColumnPositivePattern />", - " <ColumnNegativePattern />", - " <ColumnWidths>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>105</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>123</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>84</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>92</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>111</int>", - " </value>", - " </item>", - " </ColumnWidths>", - " <ColumnDisplayIndex>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>0</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>1</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>2</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>3</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>4</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>5</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>6</int>", - " </value>", - " </item>", - " </ColumnDisplayIndex>", - " <ColumnFrozen />", - " <ColumnChecked />", - " <ColumnFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <FilterExpression xsi:type=\"LogicalExpression\">", - " <Operator>AND</Operator>", - " <ExpressionList>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>GreaterThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20080101</Value>", - " </FilterExpression>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>LesserThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20081231</Value>", - " </FilterExpression>", - " </ExpressionList>", - " </FilterExpression>", - " </value>", - " </item>", - " </ColumnFilter>", - " <SelectionFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <SelectionFilter xsi:nil=\"true\" />", - " </value>", - " </item>", - " </SelectionFilter>", - " <FilterParameters>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <CommandParameters />", - " </value>", - " </item>", - " </FilterParameters>", - " <IsSortDescending>false</IsSortDescending>", - "</TableWidgetGridSerialization>]]></AnnotationContent></Gemini>" - ] - }, - { - "name": "TableWidgetSourceTable" - }, - { - "name": "QueryEditorSerialization" - } - ] - }, - { - "name": "Product Inventory 2009", - "mode": "import", - "source": { - "query": "SELECT [dbo].[FactProductInventory].* \t\tFROM [dbo].[FactProductInventory] WHERE (([DateKey] >= 20090101) AND ([DateKey] <= 20091231))", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization", - "value": [ - "<?xml version=\"1.0\" encoding=\"UTF-16\"?><Gemini xmlns=\"TableWidgetSerialization\"><AnnotationContent><![CDATA[<?xml version=\"1.0\"?>", - "<TableWidgetGridSerialization xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">", - " <ColumnSuggestedType />", - " <ColumnFormat />", - " <ColumnAccuracy />", - " <ColumnCurrencySymbol />", - " <ColumnPositivePattern />", - " <ColumnNegativePattern />", - " <ColumnWidths>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>105</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>123</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>84</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>92</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>111</int>", - " </value>", - " </item>", - " </ColumnWidths>", - " <ColumnDisplayIndex>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>0</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>1</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>2</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>3</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>4</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>5</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>6</int>", - " </value>", - " </item>", - " </ColumnDisplayIndex>", - " <ColumnFrozen />", - " <ColumnChecked />", - " <ColumnFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <FilterExpression xsi:type=\"LogicalExpression\">", - " <Operator>AND</Operator>", - " <ExpressionList>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>GreaterThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20090101</Value>", - " </FilterExpression>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>LesserThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20091231</Value>", - " </FilterExpression>", - " </ExpressionList>", - " </FilterExpression>", - " </value>", - " </item>", - " </ColumnFilter>", - " <SelectionFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <SelectionFilter xsi:nil=\"true\" />", - " </value>", - " </item>", - " </SelectionFilter>", - " <FilterParameters>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <CommandParameters />", - " </value>", - " </item>", - " </FilterParameters>", - " <IsSortDescending>false</IsSortDescending>", - "</TableWidgetGridSerialization>]]></AnnotationContent></Gemini>" - ] - }, - { - "name": "TableWidgetSourceTable" - }, - { - "name": "QueryEditorSerialization" - } - ] - }, - { - "name": "Product Inventory 2010", - "mode": "import", - "source": { - "query": "SELECT [dbo].[FactProductInventory].* \t\tFROM [dbo].[FactProductInventory] WHERE (([DateKey] >= 20100101) AND ([DateKey] <= 20101231))", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "TableWidgetSerialization", - "value": [ - "<?xml version=\"1.0\" encoding=\"UTF-16\"?><Gemini xmlns=\"TableWidgetSerialization\"><AnnotationContent><![CDATA[<?xml version=\"1.0\"?>", - "<TableWidgetGridSerialization xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">", - " <ColumnSuggestedType />", - " <ColumnFormat />", - " <ColumnAccuracy />", - " <ColumnCurrencySymbol />", - " <ColumnPositivePattern />", - " <ColumnNegativePattern />", - " <ColumnWidths>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>105</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>123</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>91</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>84</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>92</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>111</int>", - " </value>", - " </item>", - " </ColumnWidths>", - " <ColumnDisplayIndex>", - " <item>", - " <key>", - " <string>ProductKey</string>", - " </key>", - " <value>", - " <int>0</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <int>1</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>MovementDate</string>", - " </key>", - " <value>", - " <int>2</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitCost</string>", - " </key>", - " <value>", - " <int>3</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsIn</string>", - " </key>", - " <value>", - " <int>4</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsOut</string>", - " </key>", - " <value>", - " <int>5</int>", - " </value>", - " </item>", - " <item>", - " <key>", - " <string>UnitsBalance</string>", - " </key>", - " <value>", - " <int>6</int>", - " </value>", - " </item>", - " </ColumnDisplayIndex>", - " <ColumnFrozen />", - " <ColumnChecked />", - " <ColumnFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <FilterExpression xsi:type=\"LogicalExpression\">", - " <Operator>AND</Operator>", - " <ExpressionList>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>GreaterThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20100101</Value>", - " </FilterExpression>", - " <FilterExpression xsi:type=\"ConditionalExpression\">", - " <Operator>LesserThanEqualTo</Operator>", - " <Value xsi:type=\"xsd:double\">20101231</Value>", - " </FilterExpression>", - " </ExpressionList>", - " </FilterExpression>", - " </value>", - " </item>", - " </ColumnFilter>", - " <SelectionFilter>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <SelectionFilter xsi:nil=\"true\" />", - " </value>", - " </item>", - " </SelectionFilter>", - " <FilterParameters>", - " <item>", - " <key>", - " <string>DateKey</string>", - " </key>", - " <value>", - " <CommandParameters />", - " </value>", - " </item>", - " </FilterParameters>", - " <IsSortDescending>false</IsSortDescending>", - "</TableWidgetGridSerialization>]]></AnnotationContent></Gemini>" - ] - }, - { - "name": "TableWidgetSourceTable" - }, - { - "name": "QueryEditorSerialization" - } - ] - } - ], - "measures": [ - { - "name": "Total Units In", - "expression": "SUM([Units In])", - "formatString": "#,0" - }, - { - "name": "Total Units Out", - "expression": "SUM([Units Out])", - "formatString": "#,0" - }, - { - "name": "Total Units Movement", - "expression": "[Total Units In]-[Total Units Out]", - "formatString": "#,0" - }, - { - "name": "Total Units", - "expression": "CALCULATE(SUM([Units Balance]),LASTDATE('Product Inventory'[Movement Date]))", - "formatString": "#,0" - }, - { - "name": "Total Inventory Value", - "expression": "CALCULATE(SUM([Product-Date Inventory Value]),LASTDATE('Product Inventory'[Movement Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Inventory Optimal Value", - "expression": "CALCULATE(SUM([Product-Date Optimal Inventory Value]),LASTDATE('Product Inventory'[Movement Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Inventory Maximum Value", - "expression": "CALCULATE(SUM([Product-Date Max Inventory Value]),LASTDATE('Product Inventory'[Movement Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Inventory Value Performance", - "expression": "IF([Total Inventory Value]<[Total Inventory Optimal Value],-(1-([Total Inventory Value]/[Total Inventory Optimal Value])),([Total Inventory Value]-[Total Inventory Optimal Value])/([Total Inventory Maximum Value]-[Total Inventory Optimal Value]))", - "kpi": { - "targetExpression": "0", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Product Inventory'[Total Inventory Value Performance]),BLANK(),", - " If('Product Inventory'[Total Inventory Value Performance]<0,", - "\t If('Product Inventory'[Total Inventory Value Performance]<-0.2,-1,0),", - "\t If('Product Inventory'[Total Inventory Value Performance]<0.6,1,", - "\t\t If('Product Inventory'[Total Inventory Value Performance]<1,0,-1)", - "\t )", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "Centered" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "4" - }, - { - "name": "KpiThreshold_0", - "value": "-0.2" - }, - { - "name": "KpiThreshold_1", - "value": "0" - }, - { - "name": "KpiThreshold_2", - "value": "0.6" - }, - { - "name": "KpiThreshold_3", - "value": "1" - } - ] - } - }, - { - "name": "Products OverStocked", - "expression": "CALCULATE(SUM([Product-Date OverStocked]),LASTDATE('Product Inventory'[Movement Date]))", - "kpi": { - "targetExpression": "0", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Product Inventory'[Products OverStocked]),BLANK(),", - " If('Product Inventory'[Products OverStocked]<1,1,", - "\t If('Product Inventory'[Products OverStocked]<5,0,-1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "LinearReversed" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "1" - }, - { - "name": "KpiThreshold_1", - "value": "5" - } - ] - } - }, - { - "name": "Products UnderStocked", - "expression": "CALCULATE(SUM([Product-Date UnderStocked]),LASTDATE('Product Inventory'[Movement Date]))", - "kpi": { - "targetExpression": "0", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Product Inventory'[Products UnderStocked]),BLANK(),", - " If('Product Inventory'[Products UnderStocked]<5,1,", - "\t If('Product Inventory'[Products UnderStocked]<15,0,-1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "LinearReversed" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "5" - }, - { - "name": "KpiThreshold_1", - "value": "15" - } - ] - } - }, - { - "name": "Products with Negative Stock", - "expression": "CALCULATE(SUM([Product-Date Negative Stock]),LASTDATE('Product Inventory'[Movement Date]))", - "kpi": { - "targetExpression": "0", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Product Inventory'[Products with Negative Stock]),BLANK(),", - " If('Product Inventory'[Products with Negative Stock]<0.1,1,", - "\t If('Product Inventory'[Products with Negative Stock]<5,0,-1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "LinearReversed" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "0.1" - }, - { - "name": "KpiThreshold_1", - "value": "5" - } - ] - } - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "FactProductInventory" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[FactProductInventory].* FROM [dbo].[FactProductInventory] " - } - ] - }, - { - "name": "Sales Quota", - "columns": [ - { - "name": "SalesQuotaKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "SalesQuotaKey", - "summarizeBy": "none" - }, - { - "name": "EmployeeKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "EmployeeKey", - "summarizeBy": "none" - }, - { - "name": "DateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "DateKey", - "summarizeBy": "none" - }, - { - "name": "Calendar Year", - "dataType": "int64", - "sourceColumn": "CalendarYear", - "summarizeBy": "none" - }, - { - "name": "Calendar Quarter", - "dataType": "int64", - "sourceColumn": "CalendarQuarter", - "summarizeBy": "none" - }, - { - "name": "Sales Amount Quota", - "dataType": "decimal", - "sourceColumn": "SalesAmountQuota", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Date", - "dataType": "dateTime", - "sourceColumn": "Date", - "formatString": "Short Date", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - } - ], - "partitions": [ - { - "name": "Sales Quota", - "source": { - "query": "SELECT [dbo].[FactSalesQuota].* \t\tFROM [dbo].[FactSalesQuota]", - "dataSource": "AdventureWorksDW" - }, - "annotations": [ - { - "name": "QueryEditorSerialization" - }, - { - "name": "TableWidgetSerialization" - } - ] - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "FactSalesQuota" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[FactSalesQuota].* FROM [dbo].[FactSalesQuota] " - } - ] - }, - { - "name": "Internet Sales", - "columns": [ - { - "name": "Sales Order Number", - "dataType": "string", - "sourceColumn": "SalesOrderNumber" - }, - { - "name": "Sales Order Line Number", - "dataType": "int64", - "sourceColumn": "SalesOrderLineNumber", - "summarizeBy": "none" - }, - { - "name": "Revision Number", - "dataType": "int64", - "sourceColumn": "RevisionNumber", - "summarizeBy": "none" - }, - { - "name": "Order Quantity", - "dataType": "int64", - "sourceColumn": "OrderQuantity", - "summarizeBy": "none" - }, - { - "name": "Unit Price", - "dataType": "decimal", - "sourceColumn": "UnitPrice", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Extended Amount", - "dataType": "decimal", - "sourceColumn": "ExtendedAmount", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Unit Price Discount Pct", - "dataType": "double", - "sourceColumn": "UnitPriceDiscountPct", - "summarizeBy": "none" - }, - { - "name": "Discount Amount", - "dataType": "decimal", - "sourceColumn": "DiscountAmount", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Product Standard Cost", - "dataType": "decimal", - "sourceColumn": "ProductStandardCost", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Product Cost", - "dataType": "decimal", - "sourceColumn": "TotalProductCost", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Sales Amount", - "dataType": "decimal", - "sourceColumn": "SalesAmount", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Freight", - "dataType": "decimal", - "sourceColumn": "Freight", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Carrier Tracking Number", - "dataType": "string", - "sourceColumn": "CarrierTrackingNumber" - }, - { - "name": "Customer PO Number", - "dataType": "string", - "sourceColumn": "CustomerPONumber" - }, - { - "name": "Order Date", - "dataType": "dateTime", - "sourceColumn": "OrderDate" - }, - { - "name": "Due Date", - "dataType": "dateTime", - "sourceColumn": "DueDate" - }, - { - "name": "Ship Date", - "dataType": "dateTime", - "sourceColumn": "ShipDate" - }, - { - "name": "ProductKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductKey", - "summarizeBy": "none" - }, - { - "name": "OrderDateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "OrderDateKey", - "summarizeBy": "none" - }, - { - "name": "DueDateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "DueDateKey", - "summarizeBy": "none" - }, - { - "name": "ShipDateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ShipDateKey", - "summarizeBy": "none" - }, - { - "name": "CustomerKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "CustomerKey", - "summarizeBy": "none" - }, - { - "name": "PromotionKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "PromotionKey", - "summarizeBy": "none" - }, - { - "name": "CurrencyKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "CurrencyKey", - "summarizeBy": "none" - }, - { - "name": "SalesTerritoryKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "SalesTerritoryKey", - "summarizeBy": "none" - }, - { - "name": "Tax Amount", - "dataType": "decimal", - "sourceColumn": "TaxAmt", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "type": "calculated", - "name": "Gross Profit", - "dataType": "decimal", - "isDataTypeInferred": true, - "expression": "[Sales Amount]-[Total Product Cost]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - } - ], - "partitions": [ - { - "name": "Internet Sales", - "source": { - "query": "SELECT * FROM [dbo].[FactInternetSales]", - "dataSource": "AdventureWorksDW" - } - } - ], - "measures": [ - { - "name": "Internet Distinct Count Sales Order", - "expression": "DISTINCTCOUNT([Sales Order Number])", - "formatString": "#,0" - }, - { - "name": "Internet Total Sales", - "expression": "SUM([Sales Amount])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Total Discount Amount", - "expression": "SUM([Discount Amount])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Total Product Cost", - "expression": "SUM([Total Product Cost])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Total Freight", - "expression": "SUM([Freight])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Total Units", - "expression": "SUM([Order Quantity])", - "formatString": "#,0" - }, - { - "name": "Internet Order Lines Count", - "expression": "COUNT([Sales Order Line Number])", - "formatString": "#,0" - }, - { - "name": "Internet Previous Quarter Sales", - "expression": "CALCULATE([Internet Total Sales],PREVIOUSQUARTER('Date'[Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Current Quarter Sales", - "expression": "TOTALQTD([Internet Total Sales],'Date'[Date])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Previous Quarter Sales Proportion to QTD", - "expression": "[Internet Previous Quarter Sales]*([Days In Current Quarter]/[Days In Current Quarter])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Current Quarter Sales Performance", - "expression": "IFERROR([Internet Current Quarter Sales]/[Internet Previous Quarter Sales Proportion to QTD],BLANK())", - "kpi": { - "targetExpression": "1.1", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Internet Sales'[Internet Current Quarter Sales Performance]),BLANK(),", - " If('Internet Sales'[Internet Current Quarter Sales Performance]<1,-1,", - "\t If('Internet Sales'[Internet Current Quarter Sales Performance]<1.07,0,1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "Linear" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "1" - }, - { - "name": "KpiThreshold_1", - "value": "1.07" - } - ] - } - }, - { - "name": "Internet Total Tax Amount", - "expression": "SUM([Tax Amount])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Total Gross Profit", - "expression": "SUM([Gross Profit])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Previous Quarter Gross Profit", - "expression": "CALCULATE([Internet Total Gross Profit],PREVIOUSQUARTER('Date'[Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Current Quarter Gross Profit", - "expression": "TOTALQTD([Internet Total Gross Profit],'Date'[Date])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Previous Quarter Gross Profit Proportion to QTD", - "expression": "[Internet Previous Quarter Gross Profit]*([Days In Current Quarter to Date]/[Days In Current Quarter])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Internet Current Quarter Gross Profit Performance", - "expression": "IF([Internet Previous Quarter Gross Profit Proportion to QTD]<>0,([Internet Current Quarter Gross Profit]-[Internet Previous Quarter Gross Profit Proportion to QTD])/[Internet Previous Quarter Gross Profit Proportion to QTD],BLANK())", - "kpi": { - "targetExpression": "1.25", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Internet Sales'[Internet Current Quarter Gross Profit Performance]),BLANK(),", - " If('Internet Sales'[Internet Current Quarter Gross Profit Performance]<0.8,-1,", - "\t If('Internet Sales'[Internet Current Quarter Gross Profit Performance]<1.03,0,1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "Linear" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "0.8" - }, - { - "name": "KpiThreshold_1", - "value": "1.03" - } - ] - } - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "FactInternetSales" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[FactInternetSales].* FROM [dbo].[FactInternetSales] " - } - ] - }, - { - "name": "Reseller Sales", - "columns": [ - { - "name": "ProductKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ProductKey" - }, - { - "name": "OrderDateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "OrderDateKey" - }, - { - "name": "DueDateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "DueDateKey" - }, - { - "name": "ShipDateKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ShipDateKey" - }, - { - "name": "ResellerKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "ResellerKey" - }, - { - "name": "EmployeeKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "EmployeeKey" - }, - { - "name": "PromotionKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "PromotionKey" - }, - { - "name": "CurrencyKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "CurrencyKey" - }, - { - "name": "SalesTerritoryKey", - "dataType": "int64", - "isHidden": true, - "sourceColumn": "SalesTerritoryKey" - }, - { - "name": "Sales Order Number", - "dataType": "string", - "sourceColumn": "SalesOrderNumber" - }, - { - "name": "Sales Order Line Number", - "dataType": "int64", - "sourceColumn": "SalesOrderLineNumber", - "summarizeBy": "none" - }, - { - "name": "Revision Number", - "dataType": "int64", - "sourceColumn": "RevisionNumber", - "summarizeBy": "none" - }, - { - "name": "Order Quantity", - "dataType": "int64", - "sourceColumn": "OrderQuantity", - "summarizeBy": "none" - }, - { - "name": "Unit Price", - "dataType": "decimal", - "sourceColumn": "UnitPrice", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Extended Amount", - "dataType": "decimal", - "sourceColumn": "ExtendedAmount", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Unit Price Discount Pct", - "dataType": "double", - "sourceColumn": "UnitPriceDiscountPct", - "summarizeBy": "none" - }, - { - "name": "Discount Amount", - "dataType": "decimal", - "sourceColumn": "DiscountAmount", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Product Standard Cost", - "dataType": "decimal", - "sourceColumn": "ProductStandardCost", - "summarizeBy": "none", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Total Product Cost", - "dataType": "decimal", - "sourceColumn": "TotalProductCost", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Sales Amount", - "dataType": "decimal", - "sourceColumn": "SalesAmount", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Tax Amount", - "dataType": "decimal", - "sourceColumn": "TaxAmt", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Freight", - "dataType": "decimal", - "sourceColumn": "Freight", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Carrier Tracking Number", - "dataType": "string", - "sourceColumn": "CarrierTrackingNumber" - }, - { - "name": "Reseller PO Number", - "dataType": "string", - "sourceColumn": "CustomerPONumber" - }, - { - "name": "Order Date", - "dataType": "dateTime", - "sourceColumn": "OrderDate", - "formatString": "Short Date", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Due Date", - "dataType": "dateTime", - "sourceColumn": "DueDate", - "formatString": "Short Date", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Ship Date", - "dataType": "dateTime", - "sourceColumn": "ShipDate", - "formatString": "Short Date", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "type": "calculated", - "name": "Gross Profit", - "dataType": "decimal", - "isDataTypeInferred": true, - "expression": "[Sales Amount]-[Total Product Cost]", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - } - ], - "partitions": [ - { - "name": "Reseller Sales", - "source": { - "query": "SELECT * FROM [dbo].[FactResellerSales]", - "dataSource": "AdventureWorksDW" - } - } - ], - "measures": [ - { - "name": "Reseller Distinct Count Sales Order", - "expression": "DISTINCTCOUNT([Sales Order Number])", - "formatString": "#,0" - }, - { - "name": "Reseller Total Sales", - "expression": "SUM([Sales Amount])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Total Discount Amount", - "expression": "SUM([Discount Amount])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Total Product Cost", - "expression": "SUM([Total Product Cost])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Total Tax Amount", - "expression": "SUM([Tax Amount])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Total Freight", - "expression": "SUM([Freight])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Total Gross Profit", - "expression": "SUM([Gross Profit])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Total Units", - "expression": "SUM([Order Quantity])", - "formatString": "#,0" - }, - { - "name": "Reseller Order Lines Count", - "expression": "COUNT([Sales Order Line Number])", - "formatString": "#,0" - }, - { - "name": "Reseller Previous Quarter Gross Profit", - "expression": "CALCULATE([Reseller Total Gross Profit],PREVIOUSQUARTER('Date'[Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Current Quarter Gross Profit", - "expression": "TOTALQTD([Reseller Total Gross Profit],'Date'[Date])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Previous Quarter Gross Profit Proportion to QTD", - "expression": "[Reseller Previous Quarter Gross Profit]*([Days In Current Quarter to Date]/[Days In Current Quarter])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Previous Quarter Sales", - "expression": "CALCULATE([Reseller Total Sales],PREVIOUSQUARTER('Date'[Date]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Current Quarter Sales", - "expression": "TOTALQTD([Reseller Total Sales],'Date'[Date])", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Previous Quarter Sales Proportion to QTD", - "expression": "[Reseller Previous Quarter Sales]*([Days In Current Quarter to Date]/[Days In Current Quarter])" - }, - { - "name": "Reseller Total Sales - Sales Territory sliced by Employee", - "expression": "CALCULATE(SUM('Reseller Sales'[Sales Amount]),USERELATIONSHIP(Employee[EmployeeKey],'Reseller Sales'[EmployeeKey]),USERELATIONSHIP('Sales Territory'[SalesTerritoryKey],Employee[SalesTerritoryKey]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Total Sales - Sales Territory sliced by Reseller", - "expression": "CALCULATE(SUM('Reseller Sales'[Sales Amount]), USERELATIONSHIP(Reseller[ResellerKey], 'Reseller Sales'[ResellerKey]), USERELATIONSHIP(Geography[GeographyKey], Reseller[GeographyKey]), USERELATIONSHIP('Sales Territory'[SalesTerritoryKey], Geography[SalesTerritoryKey]))", - "formatString": "\\$#,0.00;(\\$#,0.00);\\$#,0.00", - "annotations": [ - { - "name": "Format", - "value": "" - } - ] - }, - { - "name": "Reseller Current Quarter Sales Performance", - "expression": "IFERROR([Reseller Current Quarter Sales]/[Reseller Previous Quarter Sales Proportion to QTD],BLANK())", - "kpi": { - "targetExpression": "1.1", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Reseller Sales'[Reseller Current Quarter Sales Performance]),BLANK(),", - " If('Reseller Sales'[Reseller Current Quarter Sales Performance]<0.8,-1,", - "\t If('Reseller Sales'[Reseller Current Quarter Sales Performance]<1.07,0,1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "Linear" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "0.8" - }, - { - "name": "KpiThreshold_1", - "value": "1.07" - } - ] - } - }, - { - "name": "Reseller Current Quarter Gross Profit Performance", - "expression": "IF([Reseller Previous Quarter Gross Profit Proportion to QTD]<>0,([Reseller Current Quarter Gross Profit]-[Reseller Previous Quarter Gross Profit Proportion to QTD])/[Reseller Previous Quarter Gross Profit Proportion to QTD],BLANK())", - "kpi": { - "targetExpression": "1.25", - "statusGraphic": "Three Symbols UnCircled Colored", - "statusExpression": [ - "if(ISBLANK('Reseller Sales'[Reseller Current Quarter Gross Profit Performance]),BLANK(),", - " If('Reseller Sales'[Reseller Current Quarter Gross Profit Performance]<0.8,-1,", - "\t If('Reseller Sales'[Reseller Current Quarter Gross Profit Performance]<1.03,0,1)", - " )", - " )", - " " - ], - "annotations": [ - { - "name": "GoalType", - "value": "StaticValue" - }, - { - "name": "KpiStatusType", - "value": "Linear" - }, - { - "name": "KpiThresholdType", - "value": "Absolute" - }, - { - "name": "KpiThresholdOrdering", - "value": "Ascending" - }, - { - "name": "KpiThresholdCount", - "value": "2" - }, - { - "name": "KpiThreshold_0", - "value": "0.8" - }, - { - "name": "KpiThreshold_1", - "value": "1.03" - } - ] - } - } - ], - "annotations": [ - { - "name": "_TM_ExtProp_DbSchemaName", - "value": "dbo" - }, - { - "name": "_TM_ExtProp_DbTableName", - "value": "FactResellerSales" - }, - { - "name": "_TM_ExtProp_QueryDefinition", - "value": " SELECT [dbo].[FactResellerSales].* FROM [dbo].[FactResellerSales] " } ] } ], "relationships": [ { - "name": "2c5177ff-b673-48e0-9168-821672c57e5e", - "fromTable": "Customer", - "fromColumn": "GeographyKey", - "toTable": "Geography", - "toColumn": "GeographyKey" - }, - { - "name": "e278ab89-4b93-42e3-b40c-636fdd8d681c", - "fromTable": "Employee", - "fromColumn": "SalesTerritoryKey", - "toTable": "Sales Territory", - "toColumn": "SalesTerritoryKey", - "isActive": false - }, - { - "name": "27dae602-f0b8-43f8-940b-43fb315458bb", - "fromTable": "Geography", - "fromColumn": "SalesTerritoryKey", - "toTable": "Sales Territory", - "toColumn": "SalesTerritoryKey", - "isActive": false - }, - { - "name": "9b8024a2-e51d-4a2b-9a8f-6a2199d1d2ea", - "fromTable": "Product", - "fromColumn": "ProductSubcategoryKey", - "toTable": "Product Subcategory", - "toColumn": "ProductSubcategoryKey" - }, - { - "name": "46425cb9-382b-4dfb-9b79-63bc5082c42b", - "fromTable": "Product Subcategory", - "fromColumn": "ProductCategoryKey", - "toTable": "Product Category", - "toColumn": "ProductCategoryKey" - }, - { - "name": "b32d6ef8-a309-4c10-8d36-0f0e2ae84901", - "fromTable": "Reseller", - "fromColumn": "GeographyKey", - "toTable": "Geography", - "toColumn": "GeographyKey" - }, - { - "name": "602b2378-4717-4122-b97e-95f36c15dc85", - "fromTable": "Product Inventory", - "fromColumn": "DateKey", - "toTable": "Date", - "toColumn": "DateKey" - }, - { - "name": "7dbfc7d9-a935-432d-b5c6-a53d129fbd16", - "fromTable": "Product Inventory", - "fromColumn": "ProductKey", - "toTable": "Product", - "toColumn": "ProductKey" - }, - { - "name": "39981e17-197f-4647-a8d8-850cbe2aea09", - "fromTable": "Sales Quota", - "fromColumn": "DateKey", - "toTable": "Date", - "toColumn": "DateKey" - }, - { - "name": "d96cf292-44da-4a47-837c-173bf1f49c18", - "fromTable": "Sales Quota", - "fromColumn": "EmployeeKey", - "toTable": "Employee", - "toColumn": "EmployeeKey" - }, - { - "name": "877c4e4a-6f61-43c8-ae8b-b748a6400407", - "fromTable": "Internet Sales", - "fromColumn": "CurrencyKey", - "toTable": "Currency", - "toColumn": "CurrencyKey" - }, - { - "name": "90d94b82-0243-4632-b9f7-99de63279961", + "name": "eac275ef-12ed-44ab-95c5-367fe2964b7a", "fromTable": "Internet Sales", "fromColumn": "CustomerKey", "toTable": "Customer", "toColumn": "CustomerKey" }, { - "name": "3db0e485-88a9-44d9-9a12-657c8ef0f881", - "fromTable": "Internet Sales", - "fromColumn": "OrderDateKey", - "toTable": "Date", - "toColumn": "DateKey" - }, - { - "name": "f5617b1d-9840-4978-8860-f337cb5f852d", - "fromTable": "Internet Sales", - "fromColumn": "DueDateKey", - "toTable": "Date", - "toColumn": "DateKey", - "isActive": false - }, - { - "name": "8cd93710-86b7-47a6-b512-230bc4c3e73d", - "fromTable": "Internet Sales", - "fromColumn": "ShipDateKey", - "toTable": "Date", - "toColumn": "DateKey", - "isActive": false - }, - { - "name": "a5016faf-9af5-4750-92ff-505d05aefe68", + "name": "a5c2f953-e0a8-4f12-984a-82eba386bc31", "fromTable": "Internet Sales", "fromColumn": "ProductKey", "toTable": "Product", "toColumn": "ProductKey" }, { - "name": "b3d9edf1-1e10-436b-b870-80029b0ee4f3", - "fromTable": "Internet Sales", - "fromColumn": "PromotionKey", - "toTable": "Promotion", - "toColumn": "PromotionKey" + "name": "2f03b75d-266f-4c06-bf9a-c00a2a5fe63f", + "fromTable": "Customer", + "fromColumn": "GeographyKey", + "toTable": "Geography", + "toColumn": "GeographyKey" }, { - "name": "d9761f6e-1fec-476d-9eee-9e1511044619", - "fromTable": "Internet Sales", - "fromColumn": "SalesTerritoryKey", - "toTable": "Sales Territory", - "toColumn": "SalesTerritoryKey" + "name": "c3b3fe98-c83c-4340-89dc-0cdb8acba196", + "fromTable": "Product", + "fromColumn": "ProductSubcategoryKey", + "toTable": "Product Subcategory", + "toColumn": "ProductSubcategoryKey" }, { - "name": "1b277ca4-d6fc-4366-b164-2fd3c56cfd24", - "fromTable": "Reseller Sales", - "fromColumn": "CurrencyKey", - "toTable": "Currency", - "toColumn": "CurrencyKey" + "name": "fbe2a336-e918-4bc2-9765-da912e40e48b", + "fromTable": "Product Subcategory", + "fromColumn": "ProductCategoryKey", + "toTable": "Product Category", + "toColumn": "ProductCategoryKey" }, { - "name": "100ca454-655f-4e46-a040-cfa2ca981f88", - "fromTable": "Reseller Sales", - "fromColumn": "OrderDateKey", - "toTable": "Date", - "toColumn": "DateKey" - }, - { - "name": "1f6426cb-30d0-4d70-bbd5-5da59ce7292b", - "fromTable": "Reseller Sales", - "fromColumn": "DueDateKey", - "toTable": "Date", - "toColumn": "DateKey", - "isActive": false - }, - { - "name": "1c37fcb7-a454-4b11-8389-9a97d5d09f4c", - "fromTable": "Reseller Sales", - "fromColumn": "ShipDateKey", - "toTable": "Date", - "toColumn": "DateKey", - "isActive": false - }, - { - "name": "262def50-5047-491a-8fc6-e96a9d66a80b", + "name": "1f7402f3-4ec1-4916-b766-dbdee2711bfd", "fromTable": "Reseller Sales", "fromColumn": "EmployeeKey", "toTable": "Employee", "toColumn": "EmployeeKey" }, { - "name": "adbcdd01-4156-4b47-9c94-5f6283c9c20a", + "name": "38811126-0c3f-47dd-9c7c-c271da105e10", "fromTable": "Reseller Sales", "fromColumn": "ProductKey", "toTable": "Product", "toColumn": "ProductKey" }, { - "name": "03b67804-b82a-433a-9589-f768a6eb3945", + "name": "7ee649d8-b06b-4965-90e1-f9244173b3d9", "fromTable": "Reseller Sales", - "fromColumn": "PromotionKey", - "toTable": "Promotion", - "toColumn": "PromotionKey" + "fromColumn": "OrderDateKey", + "toTable": "Date", + "toColumn": "DateKey" }, { - "name": "431b1361-7b09-4540-91d3-fda884108451", + "name": "e7a1ad50-9554-4041-a9c9-9075f09ebe90", "fromTable": "Reseller Sales", - "fromColumn": "ResellerKey", - "toTable": "Reseller", - "toColumn": "ResellerKey" + "fromColumn": "DueDateKey", + "toTable": "Date", + "toColumn": "DateKey", + "isActive": false }, { - "name": "b62a7abc-f954-41a1-ac0a-bce7fdd5eaa7", + "name": "1e5d554f-ea4a-4b43-9ab7-3029e8cbe953", "fromTable": "Reseller Sales", - "fromColumn": "SalesTerritoryKey", - "toTable": "Sales Territory", - "toColumn": "SalesTerritoryKey" + "fromColumn": "ShipDateKey", + "toTable": "Date", + "toColumn": "DateKey", + "isActive": false + }, + { + "name": "9f36b1bc-0fae-4f03-94a9-b6996acf96f6", + "fromTable": "Internet Sales", + "fromColumn": "DueDateKey", + "toTable": "Date", + "toColumn": "DateKey", + "isActive": false + }, + { + "name": "6e3e2bb9-d63c-4f1b-a65a-0a1a82dfbf75", + "fromTable": "Internet Sales", + "fromColumn": "ShipDateKey", + "toTable": "Date", + "toColumn": "DateKey", + "isActive": false + }, + { + "name": "ae49b4e7-772e-4fde-a7e4-3f5f80915766", + "fromTable": "Internet Sales", + "fromColumn": "OrderDateKey", + "toTable": "Date", + "toColumn": "DateKey" } ], "perspectives": [ { - "name": "Inventory", + "name": "Internet Sales", "tables": [ - { - "name": "Product Inventory", - "columns": [ - { - "name": "Units In" - }, - { - "name": "Product-Date OverStocked" - }, - { - "name": "Units Balance" - }, - { - "name": "Product-Date Negative Stock" - }, - { - "name": "Unit Cost" - }, - { - "name": "DateKey" - }, - { - "name": "Product-Date Inventory Value" - }, - { - "name": "Movement Date" - }, - { - "name": "Product-Date UnderStocked" - }, - { - "name": "Units Out" - }, - { - "name": "ProductKey" - }, - { - "name": "Product-Date Optimal Inventory Value" - }, - { - "name": "Product-Date Max Inventory Value" - } - ], - "measures": [ - { - "name": "Total Inventory Value Performance" - }, - { - "name": "Total Units Out" - }, - { - "name": "Total Units" - }, - { - "name": "Total Units Movement" - }, - { - "name": "Products with Negative Stock" - }, - { - "name": "Products UnderStocked" - }, - { - "name": "Total Inventory Value" - }, - { - "name": "Total Units In" - }, - { - "name": "Total Inventory Maximum Value" - }, - { - "name": "Total Inventory Optimal Value" - }, - { - "name": "Products OverStocked" - } - ] - }, { "name": "Date", "columns": [ { - "name": "Month Name" + "name": "CalendarQuarter" }, { - "name": "Calendar Quarter" + "name": "CalendarSemester" }, { - "name": "Month" - }, - { - "name": "Week Of Year" - }, - { - "name": "Calendar Year" - }, - { - "name": "Fiscal Quarter" - }, - { - "name": "Day Of Month" - }, - { - "name": "Fiscal Year" - }, - { - "name": "Day Name Of Week" - }, - { - "name": "Day Of Year" - }, - { - "name": "DateKey" + "name": "CalendarYear" }, { "name": "Date" }, { - "name": "Fiscal Semester" + "name": "DateKey" }, { - "name": "Day Number Of Week" + "name": "DayNumberOfMonth" }, { - "name": "Calendar Semester" + "name": "DayNumberOfWeek" + }, + { + "name": "DayNumberOfYear" + }, + { + "name": "EnglishDayNameOfWeek" + }, + { + "name": "EnglishMonthName" + }, + { + "name": "FiscalQuarter" + }, + { + "name": "FiscalSemester" + }, + { + "name": "FiscalYear" + }, + { + "name": "MonthNumberOfYear" + }, + { + "name": "WeekNumberOfYear" + } + ], + "hierarchies": [ + { + "name": "Calendar" + }, + { + "name": "Fiscal" } ], "measures": [ { - "name": "Days In Current Quarter to Date" + "name": "DaysCurrentQuarterToDate" }, { - "name": "Days In Current Quarter" + "name": "DaysInCurrentQuarter" + } + ] + }, + { + "name": "Geography", + "columns": [ + { + "name": "City" + }, + { + "name": "CountryCode" + }, + { + "name": "Country" + }, + { + "name": "GeographyKey" + }, + { + "name": "IpAddressLocator" + }, + { + "name": "PostalCode" + }, + { + "name": "SalesTerritoryKey" + }, + { + "name": "StateProvinceCode" + }, + { + "name": "StateProvince" } ] }, @@ -4660,102 +1775,79 @@ "name": "Product", "columns": [ { - "name": "Product SubCategory Name" - }, - { - "name": "Style" - }, - { - "name": "Model Name" - }, - { - "name": "Product Name" - }, - { - "name": "Product Start Date" - }, - { - "name": "Weight Unit Code" - }, - { - "name": "Safety Stock Level" - }, - { - "name": "Product Id" - }, - { - "name": "Standard Cost" + "name": "Class" }, { "name": "Color" }, { - "name": "Days To Manufacture" + "name": "DaysToManufacture" }, { - "name": "Dealer Price" + "name": "DealerPrice" + }, + { + "name": "EndDate" + }, + { + "name": "EnglishDescription" + }, + { + "name": "EnglishProductName" + }, + { + "name": "FinishedGoodsFlag" + }, + { + "name": "ListPrice" + }, + { + "name": "ModelName" + }, + { + "name": "ProductAlternateKey" }, { "name": "ProductKey" }, { - "name": "LargePhoto" + "name": "ProductLine" + }, + { + "name": "ProductSubcategoryKey" + }, + { + "name": "ReorderPoint" + }, + { + "name": "SafetyStockLevel" }, { "name": "Size" }, { - "name": "Is Finished Goods" + "name": "SizeRange" }, { - "name": "Description" + "name": "SizeUnitMeasureCode" }, { - "name": "Product Line" + "name": "StandardCost" }, { - "name": "Size Unit Code" + "name": "StartDate" }, { - "name": "List Price" + "name": "Status" }, { - "name": "Class" - }, - { - "name": "Size Range" - }, - { - "name": "Reorder Point" - }, - { - "name": "Product Status" + "name": "Style" }, { "name": "Weight" }, { - "name": "ProductSubcategoryKey" - }, - { - "name": "Product Category Name" - }, - { - "name": "Product End Date" - } - ] - }, - { - "name": "Product Subcategory", - "columns": [ - { - "name": "Product Subcategory Name" - }, - { - "name": "ProductSubcategoryKey" - }, - { - "name": "ProductCategoryKey" + "name": "WeightUnitMeasureCode" } ] }, @@ -4763,73 +1855,30 @@ "name": "Product Category", "columns": [ { - "name": "Product Category Name" + "name": "EnglishProductCategoryName" + }, + { + "name": "ProductCategoryAlternateKey" }, { "name": "ProductCategoryKey" } ] - } - ] - }, - { - "name": "Internet Operation", - "tables": [ + }, { - "name": "Date", + "name": "Product Subcategory", "columns": [ { - "name": "Month Name" + "name": "EnglishProductSubcategoryName" }, { - "name": "Calendar Quarter" + "name": "ProductCategoryKey" }, { - "name": "Month" + "name": "ProductSubcategoryAlternateKey" }, { - "name": "Week Of Year" - }, - { - "name": "Calendar Year" - }, - { - "name": "Fiscal Quarter" - }, - { - "name": "Day Of Month" - }, - { - "name": "Fiscal Year" - }, - { - "name": "Day Name Of Week" - }, - { - "name": "Day Of Year" - }, - { - "name": "DateKey" - }, - { - "name": "Date" - }, - { - "name": "Fiscal Semester" - }, - { - "name": "Day Number Of Week" - }, - { - "name": "Calendar Semester" - } - ], - "measures": [ - { - "name": "Days In Current Quarter to Date" - }, - { - "name": "Days In Current Quarter" + "name": "ProductSubcategoryKey" } ] }, @@ -4837,1145 +1886,138 @@ "name": "Internet Sales", "columns": [ { - "name": "Carrier Tracking Number" + "name": "CarrierTrackingNumber" }, { - "name": "Order Date" - }, - { - "name": "Sales Order Line Number" + "name": "CurrencyKey" }, { "name": "CustomerKey" }, { - "name": "Gross Profit" + "name": "CustomerPONumber" }, { - "name": "Due Date" + "name": "DiscountAmount" }, { - "name": "Sales Order Number" - }, - { - "name": "Discount Amount" - }, - { - "name": "Sales Amount" - }, - { - "name": "PromotionKey" - }, - { - "name": "Customer PO Number" - }, - { - "name": "ProductKey" - }, - { - "name": "Unit Price" - }, - { - "name": "Freight" - }, - { - "name": "Total Product Cost" - }, - { - "name": "CurrencyKey" - }, - { - "name": "ShipDateKey" - }, - { - "name": "Product Standard Cost" - }, - { - "name": "Extended Amount" - }, - { - "name": "Order Quantity" - }, - { - "name": "Revision Number" - }, - { - "name": "SalesTerritoryKey" - }, - { - "name": "Tax Amount" - }, - { - "name": "OrderDateKey" - }, - { - "name": "Unit Price Discount Pct" - }, - { - "name": "Ship Date" - }, - { - "name": "DueDateKey" - } - ], - "measures": [ - { - "name": "Internet Total Gross Profit" - }, - { - "name": "Internet Previous Quarter Sales Proportion to QTD" - }, - { - "name": "Internet Current Quarter Gross Profit Performance" - }, - { - "name": "Internet Current Quarter Sales" - }, - { - "name": "Internet Current Quarter Sales Performance" - }, - { - "name": "Internet Total Product Cost" - }, - { - "name": "Internet Distinct Count Sales Order" - }, - { - "name": "Internet Previous Quarter Gross Profit" - }, - { - "name": "Internet Total Sales" - }, - { - "name": "Internet Previous Quarter Gross Profit Proportion to QTD" - }, - { - "name": "Internet Order Lines Count" - }, - { - "name": "Internet Previous Quarter Sales" - }, - { - "name": "Internet Total Freight" - }, - { - "name": "Internet Total Units" - }, - { - "name": "Internet Total Tax Amount" - }, - { - "name": "Internet Current Quarter Gross Profit" - }, - { - "name": "Internet Total Discount Amount" - } - ] - }, - { - "name": "Sales Territory", - "columns": [ - { - "name": "Sales Territory Region" - }, - { - "name": "SalesTerritoryKey" - }, - { - "name": "Sales Territory Country" - }, - { - "name": "Sales Territory Group" - }, - { - "name": "Sales Territory Image" - } - ], - "measures": [ - { - "name": "Total Gross Profit" - }, - { - "name": "Distinct Count Sales Orders" - }, - { - "name": "Total Sales - Sales Territory sliced by Employee" - }, - { - "name": "Total Current Quarter Sales" - }, - { - "name": "Total Previous Quarter Sales" - }, - { - "name": "Total Tax Amount" - }, - { - "name": "Total Current Quarter Sales Performance" - }, - { - "name": "Total Freight" - }, - { - "name": "Total Sales" - }, - { - "name": "Total Previous Quarter Gross Profit Proportion to QTD" - }, - { - "name": "Order Lines Count" - }, - { - "name": "Total Discount Amount" - }, - { - "name": "Total Previous Quarter Sales Proportion to QTD" - }, - { - "name": "Total Products Cost" - }, - { - "name": "Total Units Sold" - }, - { - "name": "Total Current Quarter Gross Profit Performance" - }, - { - "name": "Total Current Quarter Gross Profit" - }, - { - "name": "Total Previous Quarter Gross Profit" - } - ] - }, - { - "name": "Product", - "columns": [ - { - "name": "Product SubCategory Name" - }, - { - "name": "Style" - }, - { - "name": "Model Name" - }, - { - "name": "Product Name" - }, - { - "name": "Product Start Date" - }, - { - "name": "Weight Unit Code" - }, - { - "name": "Safety Stock Level" - }, - { - "name": "Product Id" - }, - { - "name": "Standard Cost" - }, - { - "name": "Color" - }, - { - "name": "Days To Manufacture" - }, - { - "name": "Dealer Price" - }, - { - "name": "ProductKey" - }, - { - "name": "LargePhoto" - }, - { - "name": "Size" - }, - { - "name": "Is Finished Goods" - }, - { - "name": "Description" - }, - { - "name": "Product Line" - }, - { - "name": "Size Unit Code" - }, - { - "name": "List Price" - }, - { - "name": "Class" - }, - { - "name": "Size Range" - }, - { - "name": "Reorder Point" - }, - { - "name": "Product Status" - }, - { - "name": "Weight" - }, - { - "name": "ProductSubcategoryKey" - }, - { - "name": "Product Category Name" - }, - { - "name": "Product End Date" - } - ] - }, - { - "name": "Promotion", - "columns": [ - { - "name": "Promotion Name" - }, - { - "name": "Max Quantity" - }, - { - "name": "Promotion Type" - }, - { - "name": "Promotion Start Date" - }, - { - "name": "Min Quantity" - }, - { - "name": "Promotion Category" - }, - { - "name": "DiscountPct" - }, - { - "name": "PromotionKey" - }, - { - "name": "Promotion End Date" - } - ] - }, - { - "name": "Product Subcategory", - "columns": [ - { - "name": "Product Subcategory Name" - }, - { - "name": "ProductSubcategoryKey" - }, - { - "name": "ProductCategoryKey" - } - ] - }, - { - "name": "Geography", - "columns": [ - { - "name": "City" - }, - { - "name": "State Province Name" - }, - { - "name": "Country Region Code" - }, - { - "name": "State Province Code" - }, - { - "name": "SalesTerritoryKey" - }, - { - "name": "GeographyKey" - }, - { - "name": "Country Region Name" - }, - { - "name": "Postal Code" - } - ] - }, - { - "name": "Customer", - "columns": [ - { - "name": "CustomerKey" - }, - { - "name": "Number of Children At Home" - }, - { - "name": "Middle Name" - }, - { - "name": "Name Style" - }, - { - "name": "Date Of First Purchase" - }, - { - "name": "Address Line 2" - }, - { - "name": "GeographyKey" - }, - { - "name": "Yearly Income" - }, - { - "name": "Marital Status" - }, - { - "name": "Phone" - }, - { - "name": "Email Address" - }, - { - "name": "Gender" - }, - { - "name": "Occupation" - }, - { - "name": "Address Line 1" - }, - { - "name": "Total Cars Owned" - }, - { - "name": "Total Children" - }, - { - "name": "Suffix" - }, - { - "name": "First Name" - }, - { - "name": "Birth Date" - }, - { - "name": "Education" - }, - { - "name": "Last Name" - }, - { - "name": "Commute Distance" - }, - { - "name": "Customer Id" - }, - { - "name": "Title" - }, - { - "name": "Owns House" - } - ] - }, - { - "name": "Currency", - "columns": [ - { - "name": "CurrencyKey" - }, - { - "name": "Currency Code" - }, - { - "name": "CurrencyName" - } - ] - }, - { - "name": "Product Category", - "columns": [ - { - "name": "Product Category Name" - }, - { - "name": "ProductCategoryKey" - } - ] - } - ] - }, - { - "name": "Reseller Operation", - "tables": [ - { - "name": "Date", - "columns": [ - { - "name": "Month Name" - }, - { - "name": "Calendar Quarter" - }, - { - "name": "Month" - }, - { - "name": "Week Of Year" - }, - { - "name": "Calendar Year" - }, - { - "name": "Fiscal Quarter" - }, - { - "name": "Day Of Month" - }, - { - "name": "Fiscal Year" - }, - { - "name": "Day Name Of Week" - }, - { - "name": "Day Of Year" - }, - { - "name": "DateKey" - }, - { - "name": "Date" - }, - { - "name": "Fiscal Semester" - }, - { - "name": "Day Number Of Week" - }, - { - "name": "Calendar Semester" - } - ], - "measures": [ - { - "name": "Days In Current Quarter to Date" - }, - { - "name": "Days In Current Quarter" - } - ] - }, - { - "name": "Reseller Sales", - "columns": [ - { - "name": "Sales Order Line Number" - }, - { - "name": "Carrier Tracking Number" - }, - { - "name": "Order Date" - }, - { - "name": "Due Date" - }, - { - "name": "Gross Profit" - }, - { - "name": "Sales Order Number" - }, - { - "name": "Discount Amount" - }, - { - "name": "Sales Amount" - }, - { - "name": "PromotionKey" - }, - { - "name": "ProductKey" - }, - { - "name": "Reseller PO Number" - }, - { - "name": "Unit Price" - }, - { - "name": "Freight" - }, - { - "name": "ResellerKey" + "name": "DueDate" }, { "name": "DueDateKey" }, { - "name": "EmployeeKey" + "name": "ExtendedAmount" }, { - "name": "Total Product Cost" + "name": "Freight" }, { - "name": "CurrencyKey" + "name": "Margin" }, { - "name": "ShipDateKey" - }, - { - "name": "Product Standard Cost" - }, - { - "name": "Extended Amount" - }, - { - "name": "Order Quantity" - }, - { - "name": "Revision Number" - }, - { - "name": "SalesTerritoryKey" - }, - { - "name": "Tax Amount" + "name": "OrderDate" }, { "name": "OrderDateKey" }, { - "name": "Unit Price Discount Pct" - }, - { - "name": "Ship Date" - } - ], - "measures": [ - { - "name": "Reseller Total Tax Amount" - }, - { - "name": "Reseller Distinct Count Sales Order" - }, - { - "name": "Reseller Previous Quarter Gross Profit Proportion to QTD" - }, - { - "name": "Reseller Total Discount Amount" - }, - { - "name": "Reseller Current Quarter Sales" - }, - { - "name": "Reseller Total Gross Profit" - }, - { - "name": "Reseller Order Lines Count" - }, - { - "name": "Reseller Previous Quarter Sales Proportion to QTD" - }, - { - "name": "Reseller Total Product Cost" - }, - { - "name": "Reseller Previous Quarter Sales" - }, - { - "name": "Reseller Total Sales" - }, - { - "name": "Reseller Current Quarter Gross Profit Performance" - }, - { - "name": "Reseller Current Quarter Sales Performance" - }, - { - "name": "Reseller Total Units" - }, - { - "name": "Reseller Total Freight" - }, - { - "name": "Reseller Total Sales - Sales Territory sliced by Reseller" - }, - { - "name": "Reseller Total Sales - Sales Territory sliced by Employee" - }, - { - "name": "Reseller Current Quarter Gross Profit" - }, - { - "name": "Reseller Previous Quarter Gross Profit" - } - ] - }, - { - "name": "Sales Territory", - "columns": [ - { - "name": "Sales Territory Region" - }, - { - "name": "SalesTerritoryKey" - }, - { - "name": "Sales Territory Country" - }, - { - "name": "Sales Territory Group" - }, - { - "name": "Sales Territory Image" - } - ], - "measures": [ - { - "name": "Total Gross Profit" - }, - { - "name": "Distinct Count Sales Orders" - }, - { - "name": "Total Previous Quarter Sales" - }, - { - "name": "Total Previous Quarter Gross Profit Proportion to QTD" - }, - { - "name": "Order Lines Count" - }, - { - "name": "Total Discount Amount" - }, - { - "name": "Total Previous Quarter Sales Proportion to QTD" - }, - { - "name": "Total Products Cost" - }, - { - "name": "Total Units Sold" - }, - { - "name": "Total Current Quarter Gross Profit Performance" - }, - { - "name": "Total Current Quarter Gross Profit" - }, - { - "name": "Total Previous Quarter Gross Profit" - }, - { - "name": "Total Sales - Sales Territory sliced by Employee" - }, - { - "name": "Total Current Quarter Sales" - }, - { - "name": "Total Tax Amount" - }, - { - "name": "Total Current Quarter Sales Performance" - }, - { - "name": "Total Freight" - }, - { - "name": "Total Sales" - } - ] - }, - { - "name": "Product", - "columns": [ - { - "name": "Product SubCategory Name" - }, - { - "name": "Style" - }, - { - "name": "Model Name" - }, - { - "name": "Product Name" - }, - { - "name": "Product Start Date" - }, - { - "name": "Weight Unit Code" - }, - { - "name": "Safety Stock Level" - }, - { - "name": "Product Id" - }, - { - "name": "Standard Cost" - }, - { - "name": "Color" - }, - { - "name": "Days To Manufacture" - }, - { - "name": "Dealer Price" + "name": "OrderQuantity" }, { "name": "ProductKey" }, { - "name": "LargePhoto" - }, - { - "name": "Size" - }, - { - "name": "Is Finished Goods" - }, - { - "name": "Description" - }, - { - "name": "Product Line" - }, - { - "name": "Size Unit Code" - }, - { - "name": "List Price" - }, - { - "name": "Class" - }, - { - "name": "Size Range" - }, - { - "name": "Reorder Point" - }, - { - "name": "Product Status" - }, - { - "name": "Weight" - }, - { - "name": "ProductSubcategoryKey" - }, - { - "name": "Product Category Name" - }, - { - "name": "Product End Date" - } - ] - }, - { - "name": "Promotion", - "columns": [ - { - "name": "Promotion Name" - }, - { - "name": "Max Quantity" - }, - { - "name": "Promotion Type" - }, - { - "name": "Promotion Start Date" - }, - { - "name": "Min Quantity" - }, - { - "name": "Promotion Category" - }, - { - "name": "DiscountPct" + "name": "ProductStandardCost" }, { "name": "PromotionKey" }, { - "name": "Promotion End Date" - } - ] - }, - { - "name": "Product Subcategory", - "columns": [ - { - "name": "Product Subcategory Name" + "name": "RevisionNumber" }, { - "name": "ProductSubcategoryKey" + "name": "SalesAmount" }, { - "name": "ProductCategoryKey" - } - ] - }, - { - "name": "Employee", - "columns": [ - { - "name": "ParentEmployeeKey" + "name": "SalesOrderLineNumber" }, { - "name": "Middle Name" - }, - { - "name": "NameStyle" - }, - { - "name": "Hire Date" - }, - { - "name": "Marital Status" - }, - { - "name": "Pay Frequency" - }, - { - "name": "Phone" - }, - { - "name": "Email" - }, - { - "name": "Gender" - }, - { - "name": "Vacation Hours" - }, - { - "name": "Employee Id" - }, - { - "name": "Is Current" - }, - { - "name": "Login" - }, - { - "name": "First Name" - }, - { - "name": "Is Salaried" - }, - { - "name": "Base Rate" - }, - { - "name": "Birth Date" - }, - { - "name": "Sick Leave Hours" - }, - { - "name": "Last Name" + "name": "SalesOrderNumber" }, { "name": "SalesTerritoryKey" }, { - "name": "Status" + "name": "ShipDate" }, { - "name": "Emergency Contact Name" + "name": "ShipDateKey" }, { - "name": "Title" + "name": "TaxAmt" }, { - "name": "Department Name" + "name": "TotalProductCost" }, { - "name": "Emergency Contact Phone" + "name": "UnitPrice" }, { - "name": "EmployeeKey" - }, - { - "name": "End Date" - }, - { - "name": "Is Sales Person" - }, - { - "name": "Employee Photo" - }, - { - "name": "Start Date" + "name": "UnitPriceDiscountPct" } - ] - }, - { - "name": "Geography", - "columns": [ + ], + "measures": [ { - "name": "City" + "name": "InternetCurrentQuarterMargin" }, { - "name": "State Province Name" + "name": "InternetCurrentQuarterSales" }, { - "name": "Country Region Code" + "name": "InternetDistinctCountSalesOrder" }, { - "name": "State Province Code" + "name": "InternetOrderLinesCount" }, { - "name": "SalesTerritoryKey" + "name": "InternetPreviousQuarterMargin" }, { - "name": "GeographyKey" + "name": "InternetPreviousQuarterMarginProportionToQTD" }, { - "name": "Country Region Name" + "name": "InternetPreviousQuarterSales" }, { - "name": "Postal Code" - } - ] - }, - { - "name": "Reseller", - "columns": [ - { - "name": "Year Opened" + "name": "InternetPreviousQuarterSalesProportionToQTD" }, { - "name": "Order Month" + "name": "InternetTotalDiscountAmount" }, { - "name": "Business Type" + "name": "InternetTotalFreight" }, { - "name": "Annual Sales" + "name": "InternetTotalMargin" }, { - "name": "Number Employees" + "name": "InternetTotalProductCost" }, { - "name": "Reseller Id" + "name": "InternetTotalSales" }, { - "name": "Address Line 2" + "name": "InternetTotalTaxAmt" }, { - "name": "GeographyKey" + "name": "InternetTotalUnits" }, { - "name": "Reseller Phone" + "name": "InternetCurrentQuarterMarginPerformance" }, { - "name": "ResellerKey" - }, - { - "name": "Min Payment Type" - }, - { - "name": "Address Line 1" - }, - { - "name": "Bank Name" - }, - { - "name": "Annua Revenue" - }, - { - "name": "Reseller Name" - }, - { - "name": "Min Payment Amount" - }, - { - "name": "Product Line" - }, - { - "name": "Last Order Year" - }, - { - "name": "First Order Year" - }, - { - "name": "Order Frequency" - } - ] - }, - { - "name": "Sales Quota", - "columns": [ - { - "name": "Calendar Quarter" - }, - { - "name": "Sales Amount Quota" - }, - { - "name": "Calendar Year" - }, - { - "name": "Date" - }, - { - "name": "DateKey" - }, - { - "name": "EmployeeKey" - }, - { - "name": "SalesQuotaKey" - } - ] - }, - { - "name": "Currency", - "columns": [ - { - "name": "CurrencyKey" - }, - { - "name": "Currency Code" - }, - { - "name": "CurrencyName" - } - ] - }, - { - "name": "Product Category", - "columns": [ - { - "name": "Product Category Name" - }, - { - "name": "ProductCategoryKey" + "name": "InternetCurrentQuarterSalesPerformance" } ] } @@ -5984,24 +2026,47 @@ ], "roles": [ { - "name": "Users", - "description": "All allowed users to query the model", - "modelPermission": "read" - }, + "name": "General Users", + "description": "Readers of the model", + "modelPermission": "read", + "members": [ + { + "memberName": "kayu@microsoft.com", + "memberId": "kayu@microsoft.com", + "identityProvider": "AzureAD" + }, + { + "memberName": "bretgr@microsoft.com", + "memberId": "bretgr@microsoft.com", + "identityProvider": "AzureAD" + }, + { + "memberName": "jocaplan@microsoft.com", + "memberId": "jocaplan@microsoft.com", + "identityProvider": "AzureAD" + } + ], + "tablePermissions": [ + { + "name": "Geography", + "filterExpression": "Geography[CountryCode]=\"US\"" + }, + { + "name": "Customer", + "columnPermissions": [ + { + "name": "Phone", + "metadataPermission": "none" + } + ] + } + ] + } + ], + "annotations": [ { - "name": "Admins", - "description": "All administrators", - "modelPermission": "administrator" - }, - { - "name": "Analysts", - "description": "All users responsible for the status of the model", - "modelPermission": "readRefresh" - }, - { - "name": "Operators", - "description": "All users responsible for updating the data", - "modelPermission": "refresh" + "name": "ClientCompatibilityLevel", + "value": "500" } ] }, diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/AsPartitionProcessing.ConfigurationLogging.sqlproj b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/AsPartitionProcessing.ConfigurationLogging.sqlproj new file mode 100644 index 0000000..799f594 --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/AsPartitionProcessing.ConfigurationLogging.sqlproj @@ -0,0 +1,81 @@ + + + + + Debug + AnyCPU + AsPartitionProcessing.ConfigurationLogging + 2.0 + 4.1 + {d99fde4b-3174-440b-b867-a09c294086d0} + Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider + Database + + + AsPartitionProcessing.ConfigurationLogging + AsPartitionProcessing.ConfigurationLogging + 1033,CI + BySchemaAndSchemaType + True + v4.5.2 + CS + Properties + False + True + True + SQL_Latin1_General_CP1_CI_AS + PRIMARY + + + bin\Release\ + $(MSBuildProjectName).sql + False + pdbonly + true + false + true + prompt + 4 + + + bin\Debug\ + $(MSBuildProjectName).sql + false + true + full + false + true + true + prompt + 4 + + + 11.0 + + True + 11.0 + + + + + + + + + + + + + + + + + + + + + + DoNotCopy + + + \ No newline at end of file diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/SampleConfiguration.sql b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/SampleConfiguration.sql new file mode 100644 index 0000000..b83a1c3 --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/SampleConfiguration.sql @@ -0,0 +1,49 @@ +INSERT INTO [dbo].[ModelConfiguration] +VALUES( + 1 --[ModelConfigurationID] + ,'localhost' --[AnalysisServicesServer] + ,'AdventureWorks' --[AnalysisServicesDatabase] + ,1 --[InitialSetUp] + ,1 --[IncrementalOnline] + ,1 --[IntegratedAuth] + ,-1 --[MaxParallelism] + ,-1 --[CommitTimeout] +); + +INSERT INTO [dbo].[TableConfiguration] +VALUES( + 1 --[TableConfigurationID] + ,1 --[ModelConfigurationID] + ,'Internet Sales' --[AnalysisServicesTable] + ,0 --[DoNotProcess] +), +( + 2 --[TableConfigurationID] + ,1 --[ModelConfigurationID] + ,'Reseller Sales' --[AnalysisServicesTable] + ,0 --[DoNotProcess] +); + +INSERT INTO [dbo].[PartitioningConfiguration] +VALUES( + 1 --[PartitioningConfigurationID] + ,1 --[TableConfigurationID] + ,1 --[Granularity] 1=Monthly + ,12 --[NumberOfPartitionsFull] + ,3 --[NumberOfPartitionsForIncrementalProcess] + ,0 --[MaxDateIsNow] + ,'2012-12-01' --[MaxDate] + ,1 --[IntegerDateKey] + ,'SELECT * FROM [dbo].[FactInternetSales] WHERE OrderDateKey >= {0} AND OrderDateKey < {1} ORDER BY OrderDateKey' --[TemplateSourceQuery] +), +( + 2 --[PartitioningConfigurationID] + ,2 --[TableConfigurationID] + ,2 --[Granularity] 2=Yearly + ,3 --[NumberOfPartitionsFull] + ,1 --[NumberOfPartitionsForIncrementalProcess] + ,0 --[MaxDateIsNow] + ,'2012-12-01' --[MaxDate] + ,1 --[IntegerDateKey] + ,'SELECT * FROM [dbo].[FactResellerSales] WHERE OrderDateKey >= {0} AND OrderDateKey < {1} ORDER BY OrderDateKey' --[TemplateSourceQuery] +); diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/Script.PostDeployment1.sql b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/Script.PostDeployment1.sql new file mode 100644 index 0000000..72a32ac --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/Script.PostDeployment1.sql @@ -0,0 +1,13 @@ +/* +Post-Deployment Script Template +-------------------------------------------------------------------------------------- + This file contains SQL statements that will be appended to the build script. + Use SQLCMD syntax to include a file in the post-deployment script. + Example: :r .\myfile.sql + Use SQLCMD syntax to reference a variable in the post-deployment script. + Example: :setvar TableName MyTable + SELECT * FROM [$(TableName)] +-------------------------------------------------------------------------------------- +*/ + +:r .\SampleConfiguration.sql diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ModelConfiguration.sql b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ModelConfiguration.sql new file mode 100644 index 0000000..9eb63ee --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ModelConfiguration.sql @@ -0,0 +1,12 @@ +CREATE TABLE [dbo].[ModelConfiguration] ( + [ModelConfigurationID] INT NOT NULL, + [AnalysisServicesServer] VARCHAR (255) NOT NULL, + [AnalysisServicesDatabase] VARCHAR (255) NOT NULL, + [InitialSetUp] BIT NOT NULL, + [IncrementalOnline] BIT NOT NULL, + [IntegratedAuth] BIT NOT NULL, + [MaxParallelism] INT NOT NULL, + [CommitTimeout] INT NOT NULL, + CONSTRAINT [PK_ModelConfiguration] PRIMARY KEY CLUSTERED ([ModelConfigurationID] ASC) +); + diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/PartitioningConfiguration.sql b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/PartitioningConfiguration.sql new file mode 100644 index 0000000..c6e968d --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/PartitioningConfiguration.sql @@ -0,0 +1,16 @@ +CREATE TABLE [dbo].[PartitioningConfiguration] ( + [PartitioningConfigurationID] INT NOT NULL, + [TableConfigurationID] INT NOT NULL, + [Granularity] TINYINT NOT NULL, + [NumberOfPartitionsFull] INT NOT NULL, + [NumberOfPartitionsForIncrementalProcess] INT NOT NULL, + [MaxDateIsNow] BIT NOT NULL, + [MaxDate] DATE NULL, + [IntegerDateKey] BIT NOT NULL, + [TemplateSourceQuery] VARCHAR (MAX) NOT NULL, + CONSTRAINT [PK_PartitioningConfiguration] PRIMARY KEY CLUSTERED ([PartitioningConfigurationID] ASC), + CONSTRAINT [CK_PartitioningConfiguration_Granularity] CHECK ([Granularity]=(2) OR [Granularity]=(1) OR [Granularity]=(0)), + CONSTRAINT [CK_PartitioningConfiguration_NumberOfPartitionsForIncrementalProcess] CHECK ([NumberOfPartitionsForIncrementalProcess]<=[NumberOfPartitionsFull]), + CONSTRAINT [FK_PartitioningConfiguration_TableConfiguration] FOREIGN KEY ([TableConfigurationID]) REFERENCES [dbo].[TableConfiguration] ([TableConfigurationID]) +); + diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ProcessingLog.sql b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ProcessingLog.sql new file mode 100644 index 0000000..e66ce8f --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/ProcessingLog.sql @@ -0,0 +1,10 @@ +CREATE TABLE [dbo].[ProcessingLog] ( + [PartitioningLogID] INT IDENTITY (1, 1) NOT NULL, + [ModelConfigurationID] INT NOT NULL, + [ExecutionID] CHAR (36) NOT NULL, + [LogDateTime] DATETIME NOT NULL, + [Message] VARCHAR (8000) NOT NULL, + CONSTRAINT [PK_ProcessingLog] PRIMARY KEY CLUSTERED ([PartitioningLogID] ASC), + CONSTRAINT [FK_ProcessingLog_ModelConfiguration] FOREIGN KEY ([ModelConfigurationID]) REFERENCES [dbo].[ModelConfiguration] ([ModelConfigurationID]) +); + diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/TableConfiguration.sql b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/TableConfiguration.sql new file mode 100644 index 0000000..8c9c807 --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/TableConfiguration.sql @@ -0,0 +1,9 @@ +CREATE TABLE [dbo].[TableConfiguration] ( + [TableConfigurationID] INT NOT NULL, + [ModelConfigurationID] INT NOT NULL, + [AnalysisServicesTable] VARCHAR (255) NOT NULL, + [DoNotProcess] BIT CONSTRAINT [DF_TableConfiguration_DoNotProcess] DEFAULT ((0)) NOT NULL, + CONSTRAINT [PK_TableConfiguration] PRIMARY KEY CLUSTERED ([TableConfigurationID] ASC), + CONSTRAINT [FK_TableConfiguration_ModelConfiguration] FOREIGN KEY ([ModelConfigurationID]) REFERENCES [dbo].[ModelConfiguration] ([ModelConfigurationID]) +); + diff --git a/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Views/vPartitioningConfiguration.sql b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Views/vPartitioningConfiguration.sql new file mode 100644 index 0000000..890b767 --- /dev/null +++ b/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Views/vPartitioningConfiguration.sql @@ -0,0 +1,31 @@ + + + +CREATE VIEW [dbo].[vPartitioningConfiguration] +AS +SELECT m.[ModelConfigurationID] + ,m.[AnalysisServicesServer] + ,m.[AnalysisServicesDatabase] + ,m.[InitialSetUp] + ,m.[IncrementalOnline] + ,m.[IntegratedAuth] + ,m.[MaxParallelism] + ,m.[CommitTimeout] + ,t.[TableConfigurationID] + ,t.[AnalysisServicesTable] + ,t.[DoNotProcess] + ,CASE + WHEN p.[TableConfigurationID] IS NULL THEN 0 + ELSE 1 + END [Partitioned] + ,p.[PartitioningConfigurationID] + ,p.[Granularity] + ,p.[NumberOfPartitionsFull] + ,p.[NumberOfPartitionsForIncrementalProcess] + ,p.[MaxDateIsNow] + ,p.[MaxDate] + ,p.[IntegerDateKey] + ,p.[TemplateSourceQuery] + FROM [dbo].[ModelConfiguration] m +INNER JOIN [dbo].[TableConfiguration] t ON m.[ModelConfigurationID] = t.[ModelConfigurationID] +LEFT JOIN [dbo].[PartitioningConfiguration] p ON t.[TableConfigurationID] = p.[TableConfigurationID] diff --git a/AsPartitionProcessing/AsPartitionProcessing.SampleClient/App.config b/AsPartitionProcessing/AsPartitionProcessing.SampleClient/App.config index 624d5ce..45820cf 100644 --- a/AsPartitionProcessing/AsPartitionProcessing.SampleClient/App.config +++ b/AsPartitionProcessing/AsPartitionProcessing.SampleClient/App.config @@ -11,13 +11,13 @@ - localhost + nyctaxi.database.windows.net - AsPartitionProcessing + NYCTaxiPartitioning1400 - True + false diff --git a/AsPartitionProcessing/AsPartitionProcessing.SampleClient/Program.cs b/AsPartitionProcessing/AsPartitionProcessing.SampleClient/Program.cs index 18be712..a065ec8 100644 --- a/AsPartitionProcessing/AsPartitionProcessing.SampleClient/Program.cs +++ b/AsPartitionProcessing/AsPartitionProcessing.SampleClient/Program.cs @@ -38,7 +38,7 @@ namespace AsPartitionProcessing.SampleClient class Program { //Set sample execution mode here: - private static ExecutionMode _executionMode = ExecutionMode.InitializeFromDatabase; + private static ExecutionMode _executionMode = ExecutionMode.InitializeInline; private static string _modelConfigurationIDs; static int Main(string[] args) @@ -155,9 +155,16 @@ namespace AsPartitionProcessing.SampleClient maxDateIsNow: false, maxDate: Convert.ToDateTime("2012-12-01"), integerDateKey: true, - templateSourceQuery: "SELECT * FROM [dbo].[FactInternetSales] " + - "WHERE OrderDateKey >= {0} AND OrderDateKey < {1} " + - "ORDER BY OrderDateKey" + templateSourceQuery: + "let\n" + + " Source = #\"AdventureWorks\",\n" + + " dbo_FactInternetSales = Source{[Schema=\"dbo\",Item=\"FactInternetSales\"]}[Data],\n" + + " #\"Filtered Rows\" = Table.SelectRows(" + + "dbo_FactInternetSales, each [OrderDateKey] >= {0} and [OrderDateKey] < {1}),\n" + + " #\"Sorted Rows\" = Table.Sort(" + + "#\"Filtered Rows\",{{\"OrderDateKey\", Order.Ascending}})\n" + + "in\n" + + " #\"Sorted Rows\"\n" ) } ), @@ -174,28 +181,23 @@ namespace AsPartitionProcessing.SampleClient numberOfPartitionsForIncrementalProcess: 1, maxDateIsNow: false, maxDate: Convert.ToDateTime("2012-12-01"), - integerDateKey: true, - templateSourceQuery: "SELECT * FROM [dbo].[FactResellerSales] " + - "WHERE OrderDateKey >= {0} AND OrderDateKey < {1} " + - "ORDER BY OrderDateKey" + integerDateKey: false, + templateSourceQuery: + "let\n" + + " Source = #\"AdventureWorks\",\n" + + " dbo_FactResellerSales = Source{[Schema=\"dbo\",Item=\"FactResellerSales\"]}[Data],\n" + + " #\"Filtered Rows\" = Table.SelectRows(" + + "dbo_FactResellerSales, each [OrderDate] >= {0} and [OrderDate] < {1}),\n" + + " #\"Sorted Rows\" = Table.Sort(" + + "#\"Filtered Rows\",{{\"OrderDate\", Order.Ascending}})\n" + + "in\n" + + " #\"Sorted Rows\"\n" ) } ) } ); - #region Not needed as sample includes pre-prepared version of AdventureWorks - - ////This section not to be used normally - just to get started with AdventureWorks. It removes existing partitions that come in AdventureWorks and creates a template one to align with assumptions listed at top of PartitionProcessor.cs file. - //if (partitionedModel.InitialSetUp) - //{ - // Console.WriteLine("Initialize AdventureWorks template partitions? [y/n]"); - // if (Console.ReadLine().ToLower() == "y") - // InitializeAdventureWorksDatabase(partitionedModel); - //} - - #endregion - return partitionedModel; } @@ -353,61 +355,6 @@ namespace AsPartitionProcessing.SampleClient return password; } - #region Not needed as sample includes pre-prepared version of AdventureWorks - - private static void InitializeAdventureWorksDatabase(ModelConfiguration parameters) - { - //In order to align with assumptions listed in PartitionProcessor.cs, need to: - //1. Delete existing partitions in InternetSales and ResellerSales - //2. Create template partition (again, see comments at top of PartitionProcessor.cs) - - Console.WriteLine("Initializing AdventureWorks ..."); - - using (Server server = new Server()) - { - //Connect and get main objects - string serverConnectionString; - if (parameters.IntegratedAuth) - serverConnectionString = $"Provider=MSOLAP;Data Source={parameters.AnalysisServicesServer};"; - else - { - serverConnectionString = $"Provider=MSOLAP;Data Source={parameters.AnalysisServicesServer};User ID={parameters.UserName};Password={parameters.Password};Persist Security Info=True;Impersonation Level=Impersonate;"; - } - server.Connect(serverConnectionString); - - Database database = server.Databases.FindByName(parameters.AnalysisServicesDatabase); - if (database == null) - { - throw new Microsoft.AnalysisServices.ConnectionException($"Could not connect to database {parameters.AnalysisServicesDatabase}."); - } - - InitializeAdventureWorksTable(database, "Internet Sales", "[dbo].[FactInternetSales]"); - InitializeAdventureWorksTable(database, "Reseller Sales", "[dbo].[FactResellerSales]"); - - database.Update(Microsoft.AnalysisServices.UpdateOptions.ExpandFull); - server.Disconnect(); - } - } - - private static void InitializeAdventureWorksTable(Database database, string analysisServicesTableName, string sourceFactTableName) - { - Table table = database.Model.Tables.Find(analysisServicesTableName); - if (table == null) - { - throw new Microsoft.AnalysisServices.ConnectionException($"Could not connect to table {analysisServicesTableName}."); - } - table.Partitions.Clear(); - Partition templatePartition = new Partition(); - templatePartition.Name = analysisServicesTableName; - table.Partitions.Add(templatePartition); - templatePartition.Source = new QueryPartitionSource() - { - DataSource = database.Model.DataSources[0], //Assuming this is only data source (SqlServer localhost) - Query = $"SELECT * FROM {sourceFactTableName}" - }; - } - - #endregion } } diff --git a/AsPartitionProcessing/AsPartitionProcessing.sln b/AsPartitionProcessing/AsPartitionProcessing.sln index af53563..7d143e5 100644 --- a/AsPartitionProcessing/AsPartitionProcessing.sln +++ b/AsPartitionProcessing/AsPartitionProcessing.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26403.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsPartitionProcessing", "AsPartitionProcessing\AsPartitionProcessing.csproj", "{FB937281-B06D-47FB-9846-E97B0287AFCE}" EndProject @@ -10,12 +10,12 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0B23151E-8A6B-44AA-B670-797D1EB8B3C0}" ProjectSection(SolutionItems) = preProject AdventureWorksDW.bak = AdventureWorksDW.bak - CreateDatabaseObjects.sql = CreateDatabaseObjects.sql - SampleConfiguration.sql = SampleConfiguration.sql EndProjectSection EndProject Project("{6870E480-7721-4708-BFB8-9AE898AA21B3}") = "AsPartitionProcessing.AdventureWorks", "AsPartitionProcessing.AdventureWorks\AsPartitionProcessing.AdventureWorks.smproj", "{7274EFCC-E7DF-40AD-83DF-1DFD5B954E67}" EndProject +Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "AsPartitionProcessing.ConfigurationLogging", "AsPartitionProcessing.ConfigurationLogging\AsPartitionProcessing.ConfigurationLogging.sqlproj", "{D99FDE4B-3174-440B-B867-A09C294086D0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -66,6 +66,24 @@ Global {7274EFCC-E7DF-40AD-83DF-1DFD5B954E67}.Release|x86.ActiveCfg = Development|x86 {7274EFCC-E7DF-40AD-83DF-1DFD5B954E67}.Release|x86.Build.0 = Development|x86 {7274EFCC-E7DF-40AD-83DF-1DFD5B954E67}.Release|x86.Deploy.0 = Development|x86 + {D99FDE4B-3174-440B-B867-A09C294086D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Debug|x86.ActiveCfg = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Debug|x86.Build.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Debug|x86.Deploy.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Development|Any CPU.ActiveCfg = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Development|Any CPU.Build.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Development|Any CPU.Deploy.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Development|x86.ActiveCfg = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Development|x86.Build.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Development|x86.Deploy.0 = Debug|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Release|Any CPU.Build.0 = Release|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Release|Any CPU.Deploy.0 = Release|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Release|x86.ActiveCfg = Release|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Release|x86.Build.0 = Release|Any CPU + {D99FDE4B-3174-440B-B867-A09C294086D0}.Release|x86.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/AsPartitionProcessing/AsPartitionProcessing/PartitionProcessor.cs b/AsPartitionProcessing/AsPartitionProcessing/PartitionProcessor.cs index 564f481..a3215f9 100644 --- a/AsPartitionProcessing/AsPartitionProcessing/PartitionProcessor.cs +++ b/AsPartitionProcessing/AsPartitionProcessing/PartitionProcessor.cs @@ -164,7 +164,20 @@ namespace AsPartitionProcessing //Ensure template partition doesn't contain any data if (_modelConfiguration.InitialSetUp) { - ((QueryPartitionSource)templatePartition.Source).Query = String.Format(tableConfiguration.PartitioningConfigurations[0].TemplateSourceQuery, GetDateKey("19010102", Granularity.Daily, tableConfiguration.PartitioningConfigurations[0].IntegerDateKey, false), GetDateKey("19010101", Granularity.Daily, tableConfiguration.PartitioningConfigurations[0].IntegerDateKey, false)); //Query generated will always return nothing + string beginParam = GetDateKey("19010102", Granularity.Daily, tableConfiguration.PartitioningConfigurations[0].IntegerDateKey, false, templatePartition.Source is MPartitionSource); + string endParam = GetDateKey("19010101", Granularity.Daily, tableConfiguration.PartitioningConfigurations[0].IntegerDateKey, false, templatePartition.Source is MPartitionSource); + //Query generated will always return nothing + string query = tableConfiguration.PartitioningConfigurations[0].TemplateSourceQuery.Replace("{0}", beginParam).Replace("{1}", endParam); + + switch (templatePartition.Source) + { + case MPartitionSource mSource: + mSource.Expression = query; + break; + case QueryPartitionSource querySource: + querySource.Query = query; + break; + } templatePartition.RequestRefresh(RefreshType.DataOnly); } } @@ -579,19 +592,29 @@ namespace AsPartitionProcessing private static Partition CreateNewPartition(Table table, Partition templatePartition, PartitioningConfiguration partitioningConfiguration, string partitionKey, Granularity granularity) { - string beginParam = GetDateKey(partitionKey, granularity, partitioningConfiguration.IntegerDateKey, false); - string endParam = GetDateKey(partitionKey, granularity, partitioningConfiguration.IntegerDateKey, true); + string beginParam = GetDateKey(partitionKey, granularity, partitioningConfiguration.IntegerDateKey, false, templatePartition.Source is MPartitionSource); + string endParam = GetDateKey(partitionKey, granularity, partitioningConfiguration.IntegerDateKey, true, templatePartition.Source is MPartitionSource); Partition newPartition; newPartition = new Partition(); templatePartition.CopyTo(newPartition); newPartition.Name = partitionKey; - ((QueryPartitionSource)newPartition.Source).Query = String.Format(partitioningConfiguration.TemplateSourceQuery, beginParam, endParam); + //string query = String.Format(partitioningConfiguration.TemplateSourceQuery, beginParam, endParam); + string query = partitioningConfiguration.TemplateSourceQuery.Replace("{0}", beginParam).Replace("{1}", endParam); + switch (newPartition.Source) + { + case MPartitionSource mSource: + mSource.Expression = query; + break; + case QueryPartitionSource querySource: + querySource.Query = query; + break; + } table.Partitions.Add(newPartition); return newPartition; } - private static string GetDateKey(string partitionKey, Granularity granularity, bool integerDateKey, bool addPeriod) + private static string GetDateKey(string partitionKey, Granularity granularity, bool integerDateKey, bool addPeriod, bool mExpression) { DateTime dateVal = new DateTime(); @@ -628,7 +651,14 @@ namespace AsPartitionProcessing } else { - return $"'{dateVal.ToString("yyyy-MM-dd")}'"; + if (mExpression) + { + return $"#datetime({dateVal.ToString("yyyy, MM, dd")}, 0, 0, 0)"; + } + else + { + return $"'{dateVal.ToString("yyyy-MM-dd")}'"; + } } }