Geek Logbook

Tech sea log book

Generating a Calendar Table in Power Query (M Language)

When working with Power BI or other Power Query-supported tools, having a well-structured calendar table is essential for time-based analysis. In this blog post, we will walk through an M Language function that generates a comprehensive calendar table. Why Use a Calendar Table? A calendar table provides essential time-based fields such as year, quarter, month,

Modes and Examples of KPIs in Data Analysis Expressions (DAX)

Last Year Comparison When analyzing sales performance, it is often useful to compare the current year’s sales with the same period in the previous year. To do this, we create several calculated measures: DAX expressions to calculate similar measures for Units instead of Revenue: Year-to-Date (YTD) Comparison Year-to-date (YTD) measures track performance from the beginning

Adding Custom Columns to Your Date Table in Power BI

Introduction A Date Table is an integral part of building robust and insightful Power BI reports. While a basic Date Table allows for time-based filtering and analysis, custom columns can add even more depth and flexibility. This blog post will guide you through adding custom columns to your Date Table using DAX. 1. Why Add

How to Create a Date Table in Power BI Using DAX

Introduction In Power BI, a Date Table is essential for working with time series data effectively. A well-structured Date Table simplifies time-based analysis, allowing you to filter by specific periods, calculate year-over-year changes, and much more. This guide will walk you through creating a Date Table from scratch using DAX. 1. What is a Date

Creating a Custom Column with SWITCH in Power BI

In Power BI, creating custom columns based on multiple conditions is a powerful way to enhance the analysis and presentation of your data. One of the most versatile functions for this purpose is SWITCH, which allows you to apply different transformations or categorizations based on specific values in another column. In this blog post, we

Creating a Custom Column with a Random String in Power BI Using DAX

Introduction In Power BI, customizing your dataset by adding calculated columns can significantly enhance your data analysis capabilities. One common need is to generate random strings or categories for testing purposes, simulating scenarios, or assigning values like branch names, IDs, or categories to your data. In this post, we’ll explore how to create a custom