
When a Energy BI report says gross sales are up yr over yr, somebody will ask which dates it in contrast. Determine how the enterprise defines an entire interval, join a correct date desk, and construct every comparability from a named base measure. Then check the final closed interval and the present partial interval individually.
Suppose gross sales are reviewed each Monday, however some orders arrive late. A comparability by way of yesterday can inform a special story from a comparability by way of the final absolutely loaded date. Ask the evaluate crew which one it wants earlier than you write the measure.
Give the mannequin a reliable date desk
Create a date desk with one row per day, no blanks or gaps, and sufficient full years to cowl the comparability. If the supply shops every order date with a time, create a date-only key for the connection so the time doesn’t forestall a match. For traditional DAX time intelligence, mark it because the date desk and relate it to the column your measures ought to use, such because the order date. Microsoft’s date desk steerage covers the standards and the excellence between basic and calendar-based calculations.
Embrace helpful labels similar to monetary yr and reporting month the place they belong. In case your intervals observe a retail calendar, test how weeks and yr boundaries are outlined. A system that compares customary calendar dates can reply the improper enterprise query when your weeks shift.
Construct the comparability from a measure you possibly can test
Begin with one base measure, similar to complete internet gross sales. Reuse it for the comparability so updates to the gross sales definition don’t go away two measures counting various things. For a basic year-over-year comparability, you might use:
Internet Gross sales = SUM ( Gross sales[NetAmount] )
Internet Gross sales Prior Yr =
CALCULATE ( [Net Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
SAMEPERIODLASTYEAR shifts the dates within the present context to the prior yr. Give readers a label that tells them what occurred. “Similar interval final yr” is clearer than “Earlier gross sales.” For a proportion change, use DIVIDE to divide the distinction between present and prior-year gross sales by prior-year gross sales. If the comparability begins from zero or has no prior-year worth, go away the proportion clean and preserve the quantities seen. Readers can nonetheless see what modified with out mistaking a lacking comparability for zero progress. Take a look at that case earlier than you format the measure as a proportion.
Take a look at partial intervals and totals
Place the 2 measures in a desk by month earlier than including a chart. Evaluate a closed interval with a complete you possibly can reproduce from the supply. Then check a partial month, a yr boundary, and a filter that removes all prior-year information. Verify each the row values and the whole.
Doc the cutoff subsequent to the comparability. For instance, if the newest full gross sales date is March 12, evaluate March 1 by way of March 12 with those self same dates final yr. A visible filtered to March can nonetheless put the entire month within the date context even when the gross sales desk stops on the twelfth. Apply the cutoff to the date vary utilized by the comparability and ensure the precise dates on either side. Embrace a February or leap-year check if these dates have an effect on your stories.
Ship the agreed comparability on a schedule
When the identical comparability goes right into a weekly electronic mail, PBRS can export the Energy BI report and ship it on a schedule. The reporting crew can deal with explaining the change whereas readers get a constant copy with the interval and cutoff seen.
Take a look at one output towards the printed report after refresh. Preserve the date context subsequent to the figures so a file opened later nonetheless tells the reader what was in contrast.
If that comparability goes out each week, use the PBRS trial to check one export after refresh and test that the dates match. In a demo, see easy methods to schedule the comparability for 2 pattern groups and confirm the present and prior-year date ranges in each exports.