A #dataOp ramblings

Adventures in Business Intelligence

Advent of Code 2020 - Day 13

We arrived to the island after the ferry trip and we see ourselves in need of transportation to the nearest airport. Fortunately there’s a shuttle bus service between the sea port and the airport that could take us there. Day 13 is a wonderful mathematical puzzle, following the theme of modular arithmetic of the previous one. Let’s dive into it as there some surprises with the numeric limits on Power BI.

Advent of Code 2020 - Day 12

After the waiting room we are at a ferry navigating to the island. There seems to be a problem with the navigation system, and we volunteered to help. We have a set of instructions and we need to make some sense of them to help the captain circumvent the storm. The solution to the problem will be given by calculating the Manhattan distance (sum of the absolute values of its east/west position and its north/south position).

Advent of Code 2020 - Day 11

Today’s puzzle title is “Seating System” but it’s actually a variation of a well known zero-player game called Conway’s Game of Life. Many of us may recall this game as a popular choice for work assignments in computer science courses. Dr. John Conway, the English mathematician who created this game was last year a victim of COVID-19. If you want to know a little more about him you can read this article that was featured this week on Hacker News.

Advent of Code 2020 - Day 10

Day 10 puzzle brings us an array of adapters. In the first part we will need to find the number of differences of 1 and 3 jolts. Part two asks us to find the total number of distinct ways in which we can arranje the adapters to connect the device to the charging outlet. If you want to follow along please download AdventOfCode2020.pbit and check Day 1 post for instructions.

Advent of Code 2020 - Day 9

This puzzle looks a lot like day 1. We have a list of numbers and need to do some operations that will return some big numbers. Let’s try to DAX out them. If you want to follow along please download AdventOfCode2020.pbit and check Day 1 post for instructions. Part 1 We have a list of numbers of each the first 25 are a preamble. After this, any number can be calculated as a sum of any pair of numbers in that interval.

Advent of Code 2020 - Day 8

In day 8 we find a some weird infinite loop on a handheld device. To fix this problem we are asked to create a program that goes trough a stack of instructions. .codeaa { display: inline-block; width: 126px; text-align: center; } nop +0 acc +1 jmp +4 acc +3 jmp -3 acc -99 acc +1 jmp -4 acc +6 And after we find where the infinite loop is located we replace the bad command with the correct instruction.

Advent of Code 2020 - Day 7

Day 7: Handy Haversacks is the hardest puzzle to solve using only Power BI until now. It took me a lot of time to find a viable and fast solution. I have first tried to solve this using DAX PATH but had issues with the different levels of recursion. It was possible in the real data input for the same bag to be child of different bags in different levels. Only after a deep dive on using the List.

Advent of Code 2020 - Day 6

Time to check for some custom declarations forms. In the first part we will check the distinct number of questions anyone on each group answered “yes”, and on the second part the questions where everyone gave a positive response. If you want to follow along please download AdventOfCode2020.pbit and check Day 1 post for instructions. Part 1 The input for this problem is very similar to the passports we have seen on day 4.

Advent of Code 2020 - Day 5

This problem seems a lot of work at first but in reality it’s just binary number conversion to decimal. Picking up the provided example: .codeaa { display: inline-block; width: 106px; text-align: center; } FBFBBFF RLR If we replace the lower half [F, L] by 0, and the upper half [B, R] by 1 we get: .codeaa { display: inline-block; width: 20%; text-align: center; } 0101100 101 Doing the conversions:

Advent of Code 2020 - Day 4

Day 4 is about passport fields validation. In part 1 we need to check if all the fields exist and in part 2 check if they are valid. This seems like a job where the heavy lifting should be made by Power Query. https://adventofcode.com/2020/day/4 If you want to follow along please download AdventOfCode2020.pbit and check Day 1 post for instructions. Part 1 Following this strategy we load the data to our file and we find our first challenge.