Forum Discussion

WBscooby's avatar
WBscooby
Helper III
3 years ago
Solved

DAX - If statement using measures returning too many rows

Hi I'm a bit rusty on DAX and hoping someone can help. I have a table of customer outcomes containing Outcome ID, Outcome Date, Customer ID The table links to DateCalendar and the Customer Table...
  • grantsamborn's avatar
    grantsamborn
    3 years ago

    WBscooby 

    How about this?

     

    zMeasure 2 = 
    SUMX(
        ADDCOLUMNS(
            SUMMARIZECOLUMNS(
                'Customer'[Customer],
                'Date'[MMM-YY]
            ),
        "@Value",
            IF( [Earliest Outcome Date] < [Date_outcome], 1 )
        ),
        [@Value]
    )