Skip to main content
100%

Drawing Homer Simpson in Power BI. DAX code for Y coordinates.

✓ Published0🌍 Public
HHugoberry
Last edited Jun 9, 2017
Created on Jun 9, 2017

This example shows how to draw Homer Simpson’s head in Power BI by computing Y coordinates from a parametric equation, with a DAX measure named `HomerY` that takes an index and a function number as inputs. The measure uses ten distinct Fourier-series-like trigonometric functions (`fn0` through `fn9`), each selected via a `SWITCH` statement based on the function number, and evaluates the chosen expression using `LASTNONBLANK`. The code relies on DAX’s built-in math functions (e.g., `SIN`) and iterator `LASTNONBLANK` to access row context. The data comes from a table named `Homer`, and the visualization renders points whose Y values follow this formula, producing the iconic silhouette.

AI-generated description

Similar vizzes