AzureRecipes

PowerQuery M or DAX artefacts

General resources:

Contents

Reference Problem / Solution Related Link
Table Use a central date-table to properly correlate data and allow time-based drill-down functionality and filtering - Table-GenerateDateTable
Function/Query Get Auth Token from a AAD App Registration (Service Principal) to call AAD-authenticated REST API’s. This is for example used to load data from Log Analytics Workspace - Query-GetDataFromMsftApiWithBearerToken
Column Extend a table with Lookup data from same or different table - Column-LookupInTable
Column Create a column with calulated values from other cells of same row - Column-DiffToOtherRowsValues
Query For queries such as for LogAnalytics data, the structure of the returned data may vary. Generally this leads to problems on subsequent transformations which reference columns that may not always exist. This snippet shows the introduction of an “select” operation as the first transformation-step, which guarantees that the required set of columns always exists. Tip: Generally use rather Table.SelectColumns than Table.RemoveColumns. - Query-HandleDynamicSetOfColumns
Query Complex text transformation of a column, including Camel / Pascal case to space conversion, replacements and capitalization of words - Query-ComplexTextTransformations
DAX Add a calculated column in a data table which returns the last 5 calender weeks or a default bin (named e.g. ‘older’) which allows a well-arranged visualisation in e.g. Matrix chart - DAX-GetBinsOfRecentWeeks
Column How to apply multiple transformations to a column with Table.TransformColumns for performance improvement - Column-ApplyMultipleTransformations
Column How to recursively browse a table and collect all references found into a new column of the table (hierarchical tree of parent / child references) - Column-RecursivelyCollectChildReferences