This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the MicrosoftPowerBIMgmt module required for managing Power BI resources. | |
# This module is installed for the current user only, to avoid system-wide changes. | |
Install-Module -Name MicrosoftPowerBIMgmt -Scope CurrentUser | |
# Authenticate to the Power BI Service. | |
# This step is necessary to access and manage Power BI resources. | |
Login-PowerBIServiceAccount | |
# Function to retrieve all Power BI workspaces. | |
# It fetches data from the Power BI API and handles pagination to get all workspaces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System.Net.Http" | |
using System.Net.Http; | |
using System.Text; | |
using Newtonsoft.Json.Linq; | |
// You need to signin to https://platform.openai.com/ and create an API key for your profile then paste that key | |
// into the apiKey constant below | |
const string apiKey = "<YOUR API KEY HERE>"; | |
const string uri = "https://api.openai.com/v1/completions"; | |
const string question = "Explain the following calculation in a few sentences in simple business terms without using DAX function names:\n\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ===================================== | |
// Author: Darren Gosbell | |
// Date: 12 Apr 2023 | |
// This script works in Tabular Editor and sets the MaxParallelismPerQuery | |
// setting at the database level. | |
// ===================================== | |
if (Model.Database.CompatibilityLevel < 1569) | |
{ | |
Model.Database.CompatibilityLevel = 1569; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This gist containt useful pieces of DAX code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This gist contains useful tabular editor scripts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This gist containt useful pieces of M Query code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
P1 = "myParameter1", | |
P2 = "myParameter2", | |
#"Header" = Binary.ToText(Text.ToBinary(#"UserName"&":" & #"Password")), | |
#"BaseURL" = "https://yourwebpage.com/api/3", | |
#"DaysLogic" = | |
if | |
#"JIRA Days" = null | |
then | |
"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"transform": [ | |
{"filter": "indexof(selectedDepartments, datum['Department']) >=0"}, | |
{"fold": ["Budgeted $", "Paid $"]}, | |
{ | |
"joinaggregate": [ | |
{"op": "min", "field": "value", "as": "min"}, | |
{"op": "max", "field": "value", "as": "max"} | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"title": { | |
"text": "A Peek Inside The Mind", | |
"subtitle": ["of Michael Scott"], | |
"orient": "top", | |
"align": "center", | |
"anchor": "middle", | |
"fontSize": 22, | |
"subtitleFontSize": 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5x5 Waffle = | |
VAR _max = 500 | |
VAR _actual = 120 | |
VAR _waffles = ROUND((_actual/_max) * 50, 0) | |
VAR _gray = "#7A7979" | |
VAR _red = "#FF0000" | |
VAR _header = "data:image/svg+xml;utf8,<svg width=""200"" height=""200"" viewBox=""0 0 200 200"" fill=""none"" xmlns=""http://www.w3.org/2000/svg""> | |
<rect width=""200"" height=""200"" fill=""white""/>" | |
VAR _footer = "</svg>" |
NewerOlder