PREP WITH PROOF
Menu
MICROSOFT FABRIC / PRACTICAL GUIDE

Power BI Calculation Groups for DP-600: Test YoY % Totals

Build a Power BI time intelligence calculation group for DP-600. Use one set of DAX items across measures and test YoY % totals, formatting and blanks.

THE QUICK ANSWER

Use a Power BI calculation group when several explicit measures need the same Current, Prior Year, or Year-over-Year % calculation. Define each variation once as a calculation item and use SELECTEDMEASURE() to apply it to whichever measure the visual is evaluating. Validate the group with two different measures, a grand total, and a period with no prior-year baseline before rolling it out.

Set up two measures that share one calculation group

Create a small Sales table with the four rows below. Use a contiguous Calendar table spanning both years, mark it as the date table for this classic time intelligence example, and create an active relationship from Calendar[Date] to Sales[Date]. Add two explicit measures, Revenue = SUM(Sales[Amount]) and Orders = SUM(Sales[OrderCount]). Format Revenue as currency and Orders as a whole number. The rows contain pre-aggregated order counts for the exercise.

In Power BI Desktop, create a calculation group from the model and name it Time Comparison. Name its column Period. If prompted, enable the setting to discourage implicit measures. This exercise uses the two named measures you created, so drag those measures into the matrix rather than dragging the numeric columns and relying on automatic summarization.

DateRegionAmountOrderCount
2025-04-01North10030
2025-04-01South8020
2026-04-01North12036
2026-04-01South6024

Source: Microsoft Learn — Create calculation groups in Power BI ↗

Create Current, Prior Year, and YoY % items

Use SELECTEDMEASURE() as the Current item expression. Use CALCULATE(SELECTEDMEASURE(), SAMEPERIODLASTYEAR('Calendar'[Date])) for Prior Year. That date filter moves the current period back one year while the region filter stays in effect. Paste the code below into the YoY % calculation item as its expression. Evaluate SELECTEDMEASURE() inside CALCULATE for the prior period. A variable that already contains the current-period result would stay fixed when you change the filter context.

Keep the base formats for Current and Prior Year using SELECTEDMEASUREFORMATSTRING() if you explicitly set their format string expressions. For YoY %, set the item’s format string expression to the DAX string "0.0%". That keeps the result numeric and renders it as a percentage for both Revenue and Orders.

VAR CurrentValue = SELECTEDMEASURE()
VAR PriorValue =
    CALCULATE (
        SELECTEDMEASURE (),
        SAMEPERIODLASTYEAR ( 'Calendar'[Date] )
    )
RETURN
    DIVIDE ( CurrentValue - PriorValue, PriorValue )

Source: Microsoft Learn — Calculation groups and dynamic format strings ↗

Check the matrix total by hand

Filter April 2026 using fields from Calendar. Put Region on rows, Time Comparison[Period] on columns, and both explicit measures in Values. Turn on the total across regions so you can see the overall result under each period. Read the Revenue cells first, then compare them with Orders using the same calculation items.

If the Revenue grand total shows 0.0%, the measure is doing exactly what the exercise asks. Current and prior sums are both 180. Averaging the North and South growth rates would instead give −2.5%, which answers a different question. Orders grow from 50 to 60, so the same item returns 20.0%. If you get an unexpected blank for the prior-year cells, check the exact dates in Calendar, confirm the active relationship, and verify that the report period comes from Calendar rather than Sales.

Measure and regionCurrentPrior YearYoY %
Revenue · North12010020.0%
Revenue · South6080−25.0%
Revenue · Grand total1801800.0%
Orders · Grand total605020.0%

Source: Microsoft Learn — SAMEPERIODLASTYEAR ↗

Test a month with no prior-year value

Add a North row on 2026-05-01 with Amount 50 and OrderCount 10. Leave May 2025 in Calendar with no Sales rows, then switch the matrix filter to May 2026. The current values are 50 and 10. The prior results are blank, and DIVIDE leaves the YoY percentages blank. Add a May 2025 row with zero values and repeat. The prior results now display zero and the growth percentages still stay blank. This distinguishes no baseline from April’s genuine 0.0% growth.

Decide with the report owner how to label missing comparisons. If the visual must say “No baseline,” use a separate label or tooltip and keep the growth measure numeric.

Source: Microsoft Learn — DIVIDE ↗

Apply the same decision in the free DP-600 sample

If a scenario asks for one definition of a calculation across dozens of explicit measures, choose a calculation group. A field parameter lets a reader swap fields or measures in a visual. A dynamic format string changes how a value is displayed. A base measure defines the metric itself. Each solves a different part of building the report.

Try the first question in the free DP-600 sample below. Choose Study mode and decide which feature centralizes reusable calculation logic. Then use the explanation to check why the other options would still leave the model with duplicated DAX.

Source: Microsoft Learn — DP-600 study guide ↗

KEEP THESE THREE THINGS

Your next steps

  1. Define time comparisons once and reuse them across explicit measures.
  2. Check the aggregate calculation using totals from both periods.
  3. Test missing and zero baselines separately from genuine 0% growth.

Sources & official resources

Linked resources checked on 2026-11-26. Technical behavior and provider guidance can change; check the documentation for the version you use.

About this guide and its recommendations

Published by Prep With Proof with AI-assisted drafting. Study routines and examples are editorial suggestions, not official exam instructions or claims of a learner's personal results. Cited provider facts are linked; ownership of recommended Prep With Proof products is disclosed. No competitor endorsement or guaranteed certification outcome is implied.

Suggest a correction →