Forum Discussion
WBscooby
3 years agoHelper III
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...
- 3 years ago
How about this?
zMeasure 2 = SUMX( ADDCOLUMNS( SUMMARIZECOLUMNS( 'Customer'[Customer], 'Date'[MMM-YY] ), "@Value", IF( [Earliest Outcome Date] < [Date_outcome], 1 ) ), [@Value] )
grantsamborn
3 years agoSolution Sage
Hi WBscooby
Instead of your [Earlier Outcome Date], try this:
zMeasure =
SUMX(
'Outcomes',
IF( [Earliest Outcome Date] < [Date_outcome], 1, 0 )
)
pbix: CustomerOutcomes.pbix