Skip to content

Instantly share code, notes, and snippets.

View PBIQueryous's full-sized avatar
💭
Still queryous 🤓

Imran Haq PBIQueryous

💭
Still queryous 🤓
View GitHub Profile
// =====================================
// 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;
@PBIQueryous
PBIQueryous / bump_chart_template
Created April 6, 2024 03:36
BumpChart template
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"usermeta": {
"deneb": {
"build": "1.4.0.0",
"metaVersion": 1,
"provider": "vegaLite",
"providerVersion": "5.4.0"
},
"interactivity": {
@PBIQueryous
PBIQueryous / very_simple_gantt.json
Created March 22, 2024 06:53
Very Simple Gantt
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 500,
"data": {
"values": [
{
"phase": "0",
"name": "Project 1",
"start": "2023-03-01",
"end": "2023-03-15",
@PBIQueryous
PBIQueryous / full_ibcs_andrzej.json
Created March 22, 2024 06:50
full_ibcs_andrzej
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "IBCS based three-tier chart to show: 1) absolute values, 2) absolute variances, 3) relative variances.",
"usermeta": {
"Copyright": "Andrzej Leszkiewicz",
"License": "MIT Expat License (https://en.wikipedia.org/wiki/MIT_License)",
"Permission": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
"Github": "https://github.com/avatorl/Deneb-Vega/",
"Design Style": "IBCS Multi-tier bar charts",
"Design Style
Table.AddColumn(GetDates, "Last Working Date", each
Date.AddDays(Date.EndOfMonth([Date]),
List.Min({0, 4 - Date.DayOfWeek(Date.EndOfMonth([Date]),
Day.Monday)})))
List.Select(
List.Dates([EndOfMonth], Duration.From(- 1)),
each Date.DayOfWeek(_, Day.Monday) < 5
)
// This gist containt useful pieces of DAX code
@PBIQueryous
PBIQueryous / 00 Tabular editor scripts
Created March 7, 2024 12:49 — forked from OscarValerock/00 Tabular editor scripts
Tabular editor scripts for Power BI
//This gist contains useful tabular editor scripts.
// This gist containt useful pieces of M Query code
let
P1 = "myParameter1",
P2 = "myParameter2",
#"Header" = Binary.ToText(Text.ToBinary(#"UserName"&":" & #"Password")),
#"BaseURL" = "https://yourwebpage.com/api/3",
#"DaysLogic" =
if
#"JIRA Days" = null
then
""