RSSAmplifier

Blog

Dyota's blog

Welcome! This is a blog to share things I have learned on the job, mostly centred on Power BI. This blog started when most of my day job involves the ...

dyota257.bearblog.devRSS feed ↗10 posts

Latest posts

Project Rayfin

How to work with Project Rayfin. The full Rayfin CLI reference is here .

PowerShell: get all month short names

You never know when something like this might come in handy! @( 1 .. 12 ) | % { ( get-date -month $_ -Format "MMM" ) } | scb The result! (or maybe you can just copy it from here) Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec The old way I would have done this was by doing 1 to 12 in excel down a column, turning them into dates, and then formatting them as MMM.

`.Contains()`, `-contains`, `-match`, `-like`

It's about time that I did a note for myself on the difference between these two in PowerShell - I never can remember what the nuances are. .Contains() This is a .NET method on the string type. It is strictly case-sensitive ! There are several additional options that it could take, one of which will make the search case-insensitive. 'hello' . Contains ( 'ELLO' , [StringComparison] ::…

PSReadLine colours

See defined colours for PSReadLine Get-PSReadLineOption | Get-Member -MemberType Property | Where-Object Name -like "*Color" | ForEach -Object { $name = $_ . Name $value = ( Get-PSReadLineOption ). $name return "{0,-40} {1}sample`e[0m" -f $name , $value }

XML Traversal in PowerShell for dummies

The Object: System.Xml.XmlDocument This is a .NET class implementing the W3C DOM (Document Object Model) . When you load XML into it, it parses the entire document into a tree of nodes in memory . Every node in that tree is a .NET object. The types you encounter: .NET Type What it is XmlDocument The root container — the document itself XmlElement A tag: <EntityType Name="Foo"> XmlAttribute An…

PowerShell keyboard shortcuts

In all my time of using PowerShell (I can't believe it's been almost 7 years!) I had never considered that it might have its own keyboard shortcuts . There's a first time for everything, better late than never. Here are some, collected. Keybinding Effect Notes Ctrl + l Clear screen Equivalent to cls Alt + Enter Full screen Ctrl + w Delete previous word Ctrl + j Insert newline above cursor Ctrl +…

Power Query: Combining JSON with slightly different schemas

I recently had to take in input from a web service. The payload was a JSON array, but the objects inside the array were all of slightly different schema. Some properties existed on some objects, but not all. I had to combine all of them into one table in Power Query. However, because Power Query infers the schema from just a sample of the first few records, it was erroring when it encountered the…

Dataverse Data Migration Traps

Project Team Member: set allocation method none on all records project duration contrains project task (also 1750 days) constrains resource assignment

Dynamics F&O: GlobalOptionsetMetadata

Many tables in Dynamics 365 F&O have columns that are enums rather than stored values. Joining onto the correct option set is very cumbersome to write by hand. The process I use is the following: Download all of the options sets ever, from GlobalOptionsetMetadata ( gosm ) For every table in gosm , construct a view that has every option set possible on it joined on, as comments. This way, they can…

Agent skill - query DAX

Ever had to flick through tables back and forth in Power BI, filtering tables, matching up key IDs, copying into Excel, analysing for hours? What if an AI could do all that for you? This skill is exactly that. These are the requirements: the SKILL.md file, that tells the AI what to do, in context an open Power BI file a PowerShell script that interacts with the Power BI file that's currently open…