DAX practice: Variables for Performance & Clean Code

Chapter 18 · 3 questions · included in full access

  1. Question 1 · easy

    When a VAR is computed

    When is a DAX variable evaluated?

    Solve it in your browser
  2. Question 2 · medium

    Margin with variables

    Write Margin % using VAR / RETURN: capture [Total Sales] and [Total Cost], then divide (Sales - Cost) by Sales.

    Solve it in your browser
  3. Question 3 · medium

    Net profit

    Write Net Profit using VAR / RETURN: capture Rev = [Total Sales] and Exp = [Total Cost], then return Rev - Exp.

    Solve it in your browser

These questions are part of full access.

The first chapters of every track are free. Full access is a one-time payment.

See pricing