Returns the table data corresponding to the DetailRows expression defined on the specified Measure. If a DetailRows expression is not defined then the entire table to which the Measure belongs is returned.
A Measure reference whose DetailRows expression is to be evaluated.
IMPORTANT : DETAILROWS should perform a context transition, but in SSAS 2017 it does not do that. The behavior by design is to perform a context transition, and this should be fixed in upcoming hotfix or service packs. As a workaround, if called in a row context, it should be wrapped in a CALCULATETABLE statement. Do not use in a row context if the intended behavior should not execute the context transition – assign the result of DETAILROWS in a variable before the iterator in that case.
Learn more about DETAILROWS in the following articles:
Controlling drillthrough using Detail Rows Expressions in DAX
The Detail Rows Expression in a Tabular model provides the user with control over the drillthrough results obtained by showing details of a measure. This article describes typical DAX expressions you can use in this property. » Read more
Creating table functions in DAX using DETAILROWS
This article describes how to use the detail rows expression of a measure to obtain the equivalent of creating table functions in DAX. This allows the reusing of a table expression in multiple CALCULATE filters. » Read more
Contributors: Alberto Ferrari, Marco Russo