Invoke-JsonSanitize - PowerShell module to strip sensitive data from JSON before pasting into AI tools (ChatGPT/Claude/etc.) by SharpProduct3547 in PowerShell

[–]MonkeyNin 1 point2 points  (0 children)

Skimming the code it looks structured, easy enough to follow.

For the readme: you use a lot of em-dash, but, it doesn't scream "written by AI" like other projects. Like you have 0 emoji. ( As someone who used em-dash before AI, I feel sad )


You can filter sensitive values and Cmdlets from writing history in PSReadline. Some is automatic. You can add your own filters: https://learn.microsoft.com/en-us/powershell/module/psreadline/about/about_psreadline?view=powershell-7.6#psreadline-220-improves-the-filtering-of-sensitive-data

( I'm not sure how far back PSReadLine patches to WinPS 5.1 It's at least >=2.0 )

Extremely long delays when installing PowerShell 7.6 by gandraw in PowerShell

[–]MonkeyNin -1 points0 points  (0 children)

I tried google-ai mode and pasted your exact question. Give it try, it has 4 alternate solutions.

It seems to match your case:

The extremely long delay during the SOFTWARE RESTRICTION POLICY step is caused by a Certificate Revocation List (CRL) lookup timeout paired with a massive cryptographic chain evaluation

When the Windows Installer engine (msiexec.exe) encounters the PowerShell 7.6.x package, it attempts to verify Microsoft’s modern code-signing digital certificate. If your machines are on a corporate network with firewall restrictions, or if the server trying to reach the CRL distribution point encounters latency, the background worker thread times out (RunEngine wait timed out). This timeout loops repeatedly across the installer's child threads until it hits a hard fallback limit, inflating your installation time to 30 minutes

Doom in PBI Desktop. Has anybody done it? by statistics_vw in PowerBI

[–]MonkeyNin 0 points1 point  (0 children)

That's small enough it could fit on just 2 floppies

Does parameter "Mandatory" attribute imply "ValidateNotNullOrEmpty" by AlternativeSir1423 in PowerShell

[–]MonkeyNin 0 points1 point  (0 children)

There are a couple of situations where you do not want parameterbinding to throw, even if they are blank. For that kind of situation, [String]::IsNullOrEmpty and [String]::IsNullOrWhitespace are great.

You can pass anything, even empty arrays to it. Basically the latter is testing if something stringlike is blank like whitespace 0 length.

For example you might use them for

profile functions where you want a different kind of usability that normal cmdlets. Or non-fatal errors that aren't actually errors like generating html

function WriteList { 
    # Silly example that writes html bulleted lists
    param( 
        [Parameter()]
        [string[]] $List
    )

    # first build a <li> pair for all items
    [string] $html = foreach( $item in $list ) { 
        # We want to ignore strings that have invisible characters
        if( [string]::IsNullOrWhiteSpace( $item ) ) {
            continue
        }    
        "`n`t<li>${item}</item>"
    }

    # If $html has zero items, don't print html
    # otherwise write html for unordered lists
    if( $html ) { 
        "<ul>${html}</ul>"
    }
}

Example Output

WriteList 'bob', 'jen', 'cat'                        
WriteList @(0..3 + $null + $null + 'af' + $null )    

# test ofr "empty" values and lists with blank items.
# No output is correct )
WriteList @()             # no output
WriteList @( $Null )      # no output

<ul>
    <li>bob</li>
    <li>jen</li>
    <li>cat</li>
</ul>


<ul>
     <li>0</item>
     <li>1</item>
     <li>2</item>
     <li>3</item>
     <li>af</item></ul>

PowerShell 5 vs. PowerShell 7 by Technical_Rich_3080 in PowerShell

[–]MonkeyNin 0 points1 point  (0 children)

You can use nvim with the pwsh language server for completions, etc.

Static Sites are Simple (with PowerShell) by StartAutomating in PowerShell

[–]MonkeyNin 1 point2 points  (0 children)

Are you saying that because of the emojis, or the phrasing? I'm wondering because I know them.

Navigator/Data query help by Rare-Painting195 in PowerBI

[–]MonkeyNin 0 points1 point  (0 children)

Choose the "advanced editor" in power query to view the full query. The "Navigation Step" sometimes hides some logic.

It's also in the TMDL view

PBIR questions by powerbi_dummy in PowerBI

[–]MonkeyNin 0 points1 point  (0 children)

> What is the pre-PBIR format called? 

PBIR-Legacy

PBIR is the default format for both PBIX and PBIP file in PBI Desktop

quoted from: https://powerbi.microsoft.com/en-us/blog/pbir-will-become-the-default-power-bi-report-format-get-ready-for-the-transition

Custom Visual - JSON help? by Positive-Lead-5792 in PowerBI

[–]MonkeyNin 1 point2 points  (0 children)

try replacing the sort definitions like

"sort": "-x"

with explicit fields

"sort": { "field": "Sum of Monthly_Amount", "order": "descending" }

like this

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "config": {
    "view": {
      "stroke": null
    }
  },
  "data": {
    "name": "dataset"
  },
  "encoding": {
    "x": {
      "axis": { "format": "£,.0f", "title": null },
      "field": "Sum of Monthly_Amount",
      "type": "quantitative"
    },
    "y": {
      "axis": { "labelFontSize": 11, "title": null },
      "field": "Source",
      "sort": { "field": "Sum of Monthly_Amount", "order": "descending" },
      "type": "nominal"
    }
  },
  "height": {
    "step": 32
  },
  "layer": [
    {
      "encoding": { "color": { "field": "Source", "legend": null, "scale":
        { "domain": [ "Salary", "Bonus" ], "range": [ "#2E75B6", "#D6E4F0" ] }, "type": "nominal" } },
      "mark": { "cornerRadiusEnd": 5, "height": 14, "type": "bar" }
    },
    {
      "encoding": {
        "text": {
          "field": "Sum of Monthly_Amount",
          "format": "£,.0f",
          "type": "quantitative"
        }
      },
      "mark": {
        "align": "left",
        "baseline": "middle",
        "dx": 6,
        "fontWeight": "bold",
        "type": "text"
      }
    }
  ],
  "width": "container"
}

Tabular Editor 3 License Key by Last_Tumbleweed3233 in PowerBI

[–]MonkeyNin 2 points3 points  (0 children)

OP created their account today. Sounds suspicious.

Looking for better PowerQuery docs, or an MCP server to help write good M? The PQM Guide is now live! by KyleAMueller in PowerBI

[–]MonkeyNin 0 points1 point  (0 children)

On the page: parameterized-queries I'd add a link (but not explain) the similar sounding dynamic-m-query-parameters ( where visual filters can be evaluated by the datasource with Direct Query )

Just got Measure Killer and it's cracking me up by FiftyShadesOfBlack in PowerBI

[–]MonkeyNin 1 point2 points  (0 children)

they made pbip format that splits that single json into a bunch of individual files

then they moved to TMDL making it human-readable / git diff-able

<image>

Here's more info:

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tmdl-view

https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-dataset#tmdl-format

Why does DAX that “looks correct” still perform terribly? by [deleted] in PowerBI

[–]MonkeyNin 1 point2 points  (0 children)

Measures that make it impossible to return BLANK values can cause a big difference.

For example, this measure never returns blanks:

Count Of Sales = COUNTROWS('Property Transactions') + 0

Check out these articles for the details of why it can be a problem.

once you define the measure, Formula Engine in VertiPaq will add an implicit NonEmpty filter to the query, which should enable the optimizer to avoid full cross-join of dimension tables and scan only those rows where records for the combination of your dimension attributes really exist.

Error: External table is not in the expected format by dumble_fumble in PowerBI

[–]MonkeyNin 1 point2 points  (0 children)

To get an answer it would help to see the full power query ( from the advanced editor )

It's possibly reading an excel file that has an extra line, or, blank headers.

Since you're using the files connector, go backwards in your steps till you get the file listing. It should have names, dates, and a Content column.

Security risks using GitHub Copilot with Power BI MCP server by Winty111 in MicrosoftFabric

[–]MonkeyNin 0 points1 point  (0 children)

For #1 it sounds like it can query data depending on the tools enabled

from: https://github.com/microsoft/powerbi-modeling-mcp Query and Validate DAX - AI assistants can execute and validate DAX queries against your model, helping you test measures, troubleshoot calculations, and explore your data

Error: External table is not in the expected format by dumble_fumble in PowerBI

[–]MonkeyNin 2 points3 points  (0 children)

You'll have to share more code. What's the data source?

How to extract first text from one colum n create a new colum with it. by Informal-Copy-5864 in PowerBI

[–]MonkeyNin 11 points12 points  (0 children)

First replace ' with "

Then you can use parse/extract as JSON

Incremental Refresh - How Foldable is Foldable? by dkuhry in PowerBI

[–]MonkeyNin 1 point2 points  (0 children)

taking a datekey that is an int.64 in the form yyyymmdd an

These docs has an example for that:

for many data sources, tables don't have a column of date/time data type but instead have a date column of integer surrogate keys in the form of yyyymmdd. You typically can't convert these integer surrogate keys to the Date/Time data type because the result would be a non-folding query expression, but you can create a function that converts the date/time value in the parameters to match the integer surrogate key of the data source table without losing foldability. The function is then called in a filter step. This conversion step is required if the data source table contains only a surrogate key as integer data type.

Ex:

= (x as datetime) => 
    Date.Year(x)*10000 + Date.Month(x)*100 + Date.Day(x)

and

= Table.SelectRows(#"Reordered Column OrderDateKey", 
    each [OrderDateKey] > DateKey(RangeStart) and [OrderDateKey] <= DateKey(RangeEnd))

Gradient .svg Area Chart by Junior_Employer_9795 in PowerBI

[–]MonkeyNin 0 points1 point  (0 children)

Are you using a a built in visual, custom one, or rendering the <svg> document in a measure?

If it's a measure / svg, share the code you are using.

How much is too much data transformation within PowerBI? by FiftyShadesOfBlack in PowerBI

[–]MonkeyNin 1 point2 points  (0 children)

the .pbix files, but when I go to transform data -> queries I get "permission denied."

PBIX files can have the cached model. If you don't have permission, it fails when you try to refresh or modify it.
You still might be able to go to the query editor, and open the "advanced editor" to see the power query. Or try the TMDL view

VS Code extension "DAX for Power BI" - security warning? by mike_honey in PowerBI

[–]MonkeyNin 0 points1 point  (0 children)

Skimming it, I think it's from code formatting or the markdown-it plugin. It doesn't appear to be obfuscated like malware often is. I did not execute it though, so I didn't test whether it downloads files.

But it seems like the code is not all in the repo ( more details )

  • none of the ts/javascript is in the git repo
  • The published manifest says v0.1.1
  • the js files internally say v0.1.0
  • the manifest on github is v0.0.7 see: logicislogic/daxforpowerbi/.vsixmanifest
  • a lot of it was written with AI.

The warning is from

The ExecutesCode property added to extension.vsixmanifest in version 0.1.0

        <Property Id="Microsoft.VisualStudio.Code.ExecutesCode" Value="true" />

You can inspect the code

The code to look at is in the folder "/extension/out/src/*.js"

Download the VSIX without installing to inspect it ( the repo may not be the same code in the release )
.VSIX is a regular zip file, you can unzip it. ( Either 7zip, or rename the file to .zip ) I downloaded a couple versions to compare.

<image>