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
| { | |
| "data": { | |
| "name": "dataset" | |
| }, | |
| "title": { | |
| "text": "Top Sales by Product", | |
| "font": "Roboto", | |
| "fontSize": 20, | |
| "color": "black" |
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
| Chevron Timeline = | |
| // Assume you have a table with columns: ProcessName, ProcessDate | |
| // Example virtual table (replace with your actual table reference) | |
| VAR ProcessTable = | |
| DATATABLE( | |
| "Order", INTEGER, // Ensure order column starts with 1 (first date) and sequentially puts dates in order | |
| "ProcessName", STRING, | |
| "ProcessDate", DATETIME, | |
| { | |
| {4,"End Date", "2025-03-31"}, |
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
| EVALUATE | |
| VAR __tables = | |
| SELECTCOLUMNS( | |
| INFO.VIEW.TABLES( ), | |
| "ObjectId", [ID], | |
| "ObjectType", "Table", | |
| "Type", "N/A", | |
| "Object", [Name], | |
| "Desc", [Description], | |
| "Hidden", FALSE( ), |
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
| (sharepoint_site as text) => | |
| let | |
| Source = OData.Feed(sharepoint_site & "/_api/web/lists", null, [Implementation = "2.0"]), | |
| Select_Columns = Table.SelectColumns(Source, {"Id", "Title", "ListItemEntityTypeFullName"}), | |
| Set_Types = Table.TransformColumnTypes( | |
| Select_Columns, | |
| {{"Id", type text}, {"Title", type text}, {"ListItemEntityTypeFullName", type text}} | |
| ) | |
| in | |
| Set_Types |
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
| (sharepoint_site as text, folder_name as text) => | |
| let | |
| Source = | |
| Record.SelectFields(OData.Feed( | |
| sharepoint_site & "/_api/web/GetFolderByServerRelativeUrl('" & folder_name & "')", | |
| null, | |
| [Implementation = "2.0"] | |
| ), "Files")[Files], | |
| Select_Columns = Table.SelectColumns( | |
| Source, |
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
| (sharepoint_site as text, list_title as text) => | |
| let | |
| Source = Record.SelectFields( | |
| OData.Feed( | |
| sharepoint_site & "/_api/lists/getbytitle('" & list_title & "')", | |
| null, | |
| [Implementation = "2.0"] | |
| ), | |
| "Fields" | |
| )[Fields], |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Function AUTOCORR(dataRange As Range, lag As Integer) As Double | |
| Dim n As Long | |
| Dim i As Long | |
| Dim mean As Double | |
| Dim numerator As Double | |
| Dim denominator As Double | |
| Dim values() As Double | |
| ' Get number of points | |
| n = dataRange.Count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Using DuckDb | |
| -- Example is Lag 1 | |
| CREATE TEMP TABLE t1 ( | |
| SERIES DECIMAL(18,2) | |
| ); | |
| INSERT INTO t1 VALUES(895); | |
| INSERT INTO t1 VALUES(432); | |
| INSERT INTO t1 VALUES(282); | |
| INSERT INTO t1 VALUES(879); |
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
| function Get-RecentFiles { | |
| param ( | |
| [string]$Path = ".", | |
| [int]$Days = 1, | |
| [switch]$Recurse, | |
| [string]$Extension | |
| ) | |
| if (-Not (Test-Path $Path)) { | |
| Write-Error "Path not found: $Path" |