Forum Discussion
Anonymous
2 years agoNot applicable
SUMMARIZECOLUMNS (SQL to DAX)
Hello, DATA: I have two columns CustomerID and SalesID. GOAL: I made a table visual in the screenshot below displaying CustomerID and Max(SalesID) where SalesID is above -1. That means, the ...
- 2 years ago
Anonymous, Try a measure like
Measure = Var _tab= SUMMARIZE('Table', 'Table'[CistomerId],"_1" ,Max('Table'[SalesID]))
return COUNTROWS(SUMMARIZE(_tab,[_1])) - Anonymous2 years ago
Made a minor change to Amit's code to include the filter on SalesID
Measure = VAR _tab = SUMMARIZE ( 'Table', 'Table'[CistomerId], "_1", CALCULATE ( MAX ( 'Table'[SalesID] ), 'Table'[SalesID] > -1 ) ) RETURN COUNTROWS ( SUMMARIZE ( _tab, [_1] ) )
Anonymous
2 years agoNot applicable
Many thanks to both of you! This works brilliant!