DAX Comparison Measure

Modified on Sat, 29 Jun at 2:44 AM

Overview

We designed these with one purpose in mind: remove the customer pain point of having to learn DAX to use Power Pivot or Power BI with their QuickBooks data.


It would be impossible to anticipate every type of comparison, but there are enough present in each data model, such that a customer could replicate one without spending hours of research time.


We primarily provide two types of comparisons:

  • Simple Subtraction
  • % Difference

Most of these are used within financial related data models.


NOTE: Comparison such as Year-Over-Year (YOY) or Month-Over-Month (MOM) are included in the Calendar Pattern Measures


Examples

Compare Actual - Current MTD vs Previous Year MTD =
VAR ValuePlus = [Current Month-to-Date Actual]
VAR ValueMinus = [Previous Year Month-to-Date Actual]
VAR Result =
    IF (
        NOT ISBLANK ( ValuePlus ) && NOT ISBLANK ( ValueMinus ),
        ValuePlus - ValueMinus
    )
RETURN
    Result

 

Compare Actual - Current MTD vs. Previous Year MTD % =
DIVIDE (
    [Compare Actual - Current MTD vs Previous Year MTD],
    [Previous Year Month-to-Date Actual]
)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article