This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dateTableName = "Dates"; // Name of your date table | |
var dateKeyColName = "Date"; // Name of the date key column in the table | |
var colOperations = new List<Tuple<string, string, bool>>(){ | |
Tuple.Create("Quarter & Year", "QuarternYear", true), | |
Tuple.Create("Month & Year", "MonthnYear", true), | |
Tuple.Create("Month Name", "MonthOfYear", true), | |
Tuple.Create("Month Short", "MonthOfYear", true), | |
Tuple.Create("Month Initial", "MonthOfYear", true), | |
Tuple.Create("Week & Year", "WeeknYear", true), | |
Tuple.Create("Day of Week Name", "DayOfWeek", true), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
fnDateTable = ( StartDate as date, EndDate as date, optional FYStartMonthNum as number, optional Holidays as list, optional WDStartNum as number, optional AddRelativeNetWorkdays as logical ) as table => | |
let | |
FYStartMonth = List.Select({1..12}, each _ = FYStartMonthNum){0}? ?? 1, | |
WDStart = List.Select({0..1}, each _ = WDStartNum){0}? ?? 0, | |
CurrentDate = Date.From(DateTimeZone.FixedUtcNow()), | |
DayCount = Duration.Days(Duration.From(EndDate - StartDate)) + 1, | |
weekStart = Day.Monday, | |
HolidaysProvided = Holidays <> null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "#################################################" | |
# Dockerfile to build a GitHub Pages Jekyll site | |
# - Ubuntu 22.04 | |
# - Ruby 3.1.2 | |
# - Jekyll 3.9.3 | |
# - GitHub Pages 288 | |
# | |
# This code is from the following Gist: | |
# https://gist.github.com/BillRaymond/db761d6b53dc4a237b095819d33c7332#file-post-run-txt | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
fnGetSQLServer = | |
let | |
GetSQLServerType = type function ( | |
server as ( | |
type text | |
meta [ | |
Documentation.FieldCaption = "Server Name", | |
Documentation.FieldDescription = "SQL Server name", | |
Document.SampleValues = {"SERVER"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** GetDistanceMiles */ | |
/* | |
FUNCTION NAME: GetDistanceMiles | |
DESCRIPTION: Returns the distance in miles between points X and Y based on their | |
decimal latitude and longitude coordinates | |
ARGS: | |
LatX: Point X's decimal latitude | |
LngX: Point X's decimal longitude | |
LatY: Point Y's decimal latitude | |
LngY: Point Y's decimal longitude |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** ConcatRows */ | |
/* | |
FUNCTION NAME: ConcatRows | |
DESCRIPTION: For a rectangular array (including table refs), returns | |
a dynamic array 1 column wide and n rows tall, concatenating the | |
values from each row | |
ARGS: | |
rng: The source range to be concatenated | |
delim: The delimiter to be used | |
skipblanks: In each row's concatenation, TRUE skips blank |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** ConcatRowsFormat */ | |
/* | |
FUNCTION NAME: ConcatRowsFormat | |
DESCRIPTION: For a rectangular array (including table refs), returns | |
a dynamic array 1 column wide and n rows tall, concatenating the | |
values from each row and applying the specified number formats | |
to the values from each column | |
ARGS: | |
rng: The source range to be concatenated | |
format: 1-row by n-column array of number formats to apply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** DistinctList */ | |
/* | |
FUNCTION NAME: DistinctList | |
DESCRIPTION: Given a n-row by 1-column range of concatenated text, | |
returns a n-row by 1-column array of the unique values. Not | |
sorted (use DistinctListSort to get sorted list) | |
ARGS: | |
rng: Range holding original values | |
delim: Delimiter used to split the concatenated strings | |
col: Column index you want returned (1st column = 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** DistinctListSort */ | |
/* | |
FUNCTION NAME: DistinctListSort | |
DESCRIPTION: Given a n-row by 1-column range of concatenated text, | |
returns a n-row by 1-column array of the unique values. Return | |
array is sorted | |
ARGS: | |
rng: Range holding original values | |
delim: Delimiter used to split the concatenated strings | |
col: Column index you want returned (1st column = 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Created by Brian Julius, 23 Oct 2024 using AI model o1-P | |
BulletChartSVG = | |
VAR __TotalSales = [Total Sales] | |
VAR __TargetSales = [Current Year Sales Target] | |
-- Normalize the bars by using the maximum target sales across all data | |
VAR __MaxTargetSales = [Max Sales Target] | |
-- Scale the bars based on the maximum target sales |
NewerOlder