pbPassingBI
/
8 questions

DAX calculations — quiz

8 questions covering this module. Measures, filter context, CALCULATE, logical functions and time intelligence.

  1. You want a percent of the total the user has currently selected via slicers. Use:

    1. ALL
    2. ALLSELECTED
    3. REMOVEFILTERS
    4. KEEPFILTERS

    Answer: ALLSELECTED — ALLSELECTED clears the visual filter but keeps slicer and page filters — percent of visible total.

  2. By default, a CALCULATE filter argument on a column:

    1. Adds to existing filters
    2. Replaces existing filters on that column
    3. Is ignored if a slicer exists
    4. Only works in calculated columns

    Answer: Replaces existing filters on that column — Replacement is the default; wrap in KEEPFILTERS to intersect with the existing context instead.

  3. Prior-year measures return blank for recent months. Most likely cause?

    1. Wrong DAX function
    2. The Date table does not cover complete years
    3. Too many relationships
    4. DirectQuery mode

    Answer: The Date table does not cover complete years — Time intelligence needs a contiguous date table spanning full years, or edge periods break.

  4. Which anchors a rolling 12-month window correctly inside a matrix?

    1. TODAY()
    2. MAX('Date'[Date])
    3. NOW()
    4. FIRSTDATE(Sales[Date])

    Answer: MAX('Date'[Date]) — MAX of the date column respects the current row context, so historical rows compute correctly.

  5. RANKX returns 1 for every product. Most likely fix?

    1. Change to DESC
    2. Pass ALL(Product[Name]) as the table argument
    3. Use TOPN instead
    4. Add a variable

    Answer: Pass ALL(Product[Name]) as the table argument — Without ALL, ranking happens within each row's own filter context, so everything ranks first.

  6. Why prefer DIVIDE over the / operator?

    1. It is faster
    2. It returns blank instead of erroring on divide by zero
    3. It handles text
    4. It respects slicers

    Answer: It returns blank instead of erroring on divide by zero — DIVIDE has built-in divide-by-zero handling and an optional alternate result.

  7. A percent-of-total shows 100% on every row. Cause?

    1. Wrong aggregation
    2. The denominator is filtered like the numerator — needs ALL
    3. Missing relationship
    4. Wrong data type

    Answer: The denominator is filtered like the numerator — needs ALL — ALL or ALLSELECTED removes the filter from the denominator.

  8. The difference between ALL and ALLSELECTED:

    1. None
    2. ALLSELECTED respects slicer selections; ALL ignores them
    3. ALL is faster
    4. ALLSELECTED works only on dates

    Answer: ALLSELECTED respects slicer selections; ALL ignores them — ALLSELECTED usually matches what people mean by "of total".