Forum Discussion
ngct1112
4 years agoPost Patron
DAX - Filter before Summarize
Hi All, I would like to seek some helps for the DAX to summarize the "QTY" by "ID". However, I would like to Filter the "Status" to Ordered only before summarize. ID QTY Status 1 7 Ordere...
- 4 years ago
Try
_Table = SUMMARIZE(FILTER('Table','Table'[Status]="Ordered"),'Table'[ID], "SUM", CALCULATE(SUM('Table'[QTY])))
Jihwan_Kim
4 years agoSuper User
Hi,
Please try the below for creating a new table.
_Table =
VAR filteredtable =
FILTER ( 'Table', 'Table'[Status] = "Ordered" )
VAR newtable =
SUMMARIZE ( filteredtable, 'Table'[ID], 'Table'[QTY] )
RETURN
newtable