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
// Excel BI challenge E687 - https://www.linkedin.com/feed/update/urn:li:activity:7313409928927309825/ | |
/* | |
Input Table (Matrix): | |
let | |
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PVHbEcMwCNvF3/2IzdOz5LL/GkVyyF2rI4BAyPc9RMdvmBTUL7JAA9FVkBM1ByCnNp7fPRRNZgUbMONwkY2NBKi+CmSRkKsJiiixzNC+uRtLFqtUAcZCFCwgmqDxH92b/qbmJkPWUWE9VkDM62RZ5XJlN9Xt6CUJMZJtwARVvKH84BXSclRbLG1JHE0bCY6J+yIHE1dbyiscAqW9O5014pWFSZ59qPXLRHxvM/uQfVTF5zUq0kOhO/Dh8T5N6X2ePw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Column5 = _t, Column6 = _t, Column7 = _t, Column8 = _t, Column9 = _t, Column10 = _t]), | |
ChangedType = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}, {"Column2", Int64.Type}, {"Column3", Int64.Type}, {"Column4", Int64.Type}, {"Column5", Int64.Type}, {"Column6", Int64.Type}, {"Column7", Int64.Type}, {"Column8", Int64.Type}, {"Column9", Int64.Type}, {"Co |
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
import json | |
import clr # From pythonnet, remove any existing clr -- pip uninstall clr | |
import os | |
import msal | |
import requests | |
# Tabular Object Model DLLs that are required to interact with SSAS Dataset | |
folder = r"C:\Windows\Microsoft.NET\assembly\GAC_MSIL" |
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
import msal | |
import requests | |
import pandas as pd | |
import itertools | |
# pip install msrest, mstrestazure | |
# pip install azure.graphrbac | |
# pip install azure.common | |
from azure.common.credentials import ServicePrincipalCredentials |
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
Login-PowerBIServiceAccount | |
# ================================================ | |
# Add a user to all workspaces: | |
# ================================================ | |
$UserEmail = "abc@xyz.onmicrosoft.com" | |
$AccessType = "Admin" | |
Get-PowerBIWorkspace -Scope Organization -WarningAction Ignore | |
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
// Tabular Nuget - https://www.nuget.org/packages/Microsoft.AnalysisServices.NetCore.retail.amd64/19.55.3.1?_src=template | |
using System; | |
using Microsoft.AnalysisServices.Tabular; | |
using Excel = Microsoft.Office.Interop.Excel; | |
using System.IO; | |
using System.Collections.Generic; | |
namespace Practicing_TOM | |
{ |
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
import json | |
import clr | |
folder = r"C:\Windows\Microsoft.NET\assembly\GAC_MSIL" | |
clr.AddReference(folder + | |
r"\Microsoft.AnalysisServices.Tabular\v4.0_15.0.0.0__89845dcd8080cc91\Microsoft.AnalysisServices.Tabular.DLL") | |
clr.AddReference(folder + | |
r"\Microsoft.AnalysisServices\v4.0_15.0.0.0__89845dcd8080cc91\Microsoft.AnalysisServices.DLL") |
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
import clr | |
import pandas as pd | |
clr.AddReference(r"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.AnalysisServices.Tabular\v4.0_15.0.0" | |
r".0__89845dcd8080cc91\Microsoft.AnalysisServices.Tabular.DLL") | |
import Microsoft.AnalysisServices.Tabular as Tabular | |
server = Tabular.Server() | |
connection_string = "localhost:56811" |
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
// https://www.linkedin.com/posts/excelbi_powerbi-powerquery-dax-activity-6989797395572109312-e6hp?utm_source=share&utm_medium=member_desktop | |
let | |
Source = Table.FromRows ( | |
Json.Document ( | |
Binary.Decompress ( | |
Binary.FromText ( | |
"rZRRT9swEMe/SpVnItlOHMePBbFBt1ZMRWWo4uFoTWuROpPTwrZPv7sLsIgUxAYv0Z3j/O7/P188nyfT4VlykMjCKCkwGO0qDwEwyi0+lJAqlTIVlEx/uLBwEaMxRA/rwYmvKsxOJ8nVwTy5rD8INA31/U0Ft+4fecsXgexRaaWtxOB4s3HbLQZGMEkUKcFyTD5H+NXUgZiwrFji+feeqD0k+ToJuiRWk2faaBJ/Fj2Kx6AQj76ETRW9mkFYuni9i6s1FbuD0NyhMbe/VR9EZHVaF7aQ/EFsm94alAU33WByGOF3jc3G8KjabQlxftkT9RfkHkDiLaBup7QtjSwx+BQdiveLW7KmW4xJRZ4qSg5dXLnAI7C+B7I3GfXl/BcLOjCWVGhjeeMINq6hhfLRlcja8z+CeM3HfwKBjV/0m9PH2C4me8Ls47AQU8pMUblxHfyC+0uZtJbNCEbg9JHNr9AMZm4FVGgy64l5L6rVY4uspJ3DyjdAsnPT/hmWZpAtteM5uMC587DBhW87CFu/oOtjNuzr6iLrZ8jy7UjWhx5lqR/uiaamO0I/DaQwqSL02C/x32/cTyJDrDwVnXzpKXsHDIfp6g8=", | |
BinaryEncoding.Base64 | |
), |
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
// https://www.linkedin.com/posts/excelbi_powerbi-powerquery-dax-activity-6989434734816714752-Iys4?utm_source=share&utm_medium=member_desktop | |
let | |
Source = Table.FromRows ( | |
Json.Document ( | |
Binary.Decompress ( | |
Binary.FromText ( | |
"XVRNc5swEP0rGs45GCG+jkncJq3rtuNkkoPrgwybogkWqQB36K+vdmHBycEYpH2r9/btar8PbitnWvEMxyO44CqQK/9QOb/hfzb+h6tVcLjaB5/qrrHixmlb+tU4xS3EYJhCTI5LCaEw/rquwYovZ3BtY/1ilGDSGN/oGPxM4/EMAjw6XQxiW9w5XQ6YSjKbGAEhxipcDxnxZGwB4la7jjQoBKRTRg+VxH7h09h/jdg2vbPG/sa9iLONKVlCwhDPxHbi3tQ1LuPZIeZMpjOy/IL9Tg+CJGMaFCn5wSrknPfa+lKaRqz12bRIPOIHFyREQuFcy8cKGrHTXW1eXjAq5RAsDjKJ2QQvmph7IlbsmqOxY/VpkyAKwRIp5nxYSpiv4NwgHjpdvFZN34LfWbENmeL6xvzLCfTQwVvl+2Kr3bF3aFtGJ1H+ubRchpDle4i3Wo/cJIZkyRhDhyj8UIrlr80rnI4gtn3XnI4Nnh5xu5Jb7+QQ5JvuHNS1eHhz8BfIQOpUJJcqdiNPZtzUstqKey++I2JxxlLSnBOkkus9Fg01iI0pcShUyKHU4tn8mXP4pvEybtzg+2oaLX8K0ommnqKayWg0maw3J7HubaGRUDo3ylSs6dUTJTMq/af33Qrix69+tZLpd9CoPCLVyUXLSuaYEPDDZUBDQ9MRTpdBjhwzROXjbbA1RaWhFp+NrYFs5wKFk9nU+9miHM7GijvtLHSonS6KaJGSy |
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
// https://www.linkedin.com/posts/excelbi_excel-challenge-advancedexcel-activity-6988347482803998720-NWD_?utm_source=share&utm_medium=member_desktop | |
let | |
Source = Table.FromRows ( | |
Json.Document ( | |
Binary.Decompress ( | |
Binary.FromText ( | |
"i45Wcs5IzSlOTVTSUQpKTcxR8E1MKcpMAfIMdc2VYnWi0US9SstS80pKi4FMS11DsAIkIYRZJromWHS7KTgrOCUWJafm5OeBVJnpWoBVoYsjGWkENcgRqMQ3MycxD8Uac6gj0Q1AVg10pwFYEUIbunITXVMMS1BdbqpriaECyZXGukZKsbEA", | |
BinaryEncoding.Base64 | |
), | |
Compression.Deflate |
NewerOlder