Forum Discussion
CrassJoin
7 years agoAdvocate I
SSAS Tabular - Default Detail Rows Expression
For a SSAS 2017 tabular model surfaced via pivot tables, a handy (vital) feature is the ability to drill through to a sensible selection of detail rows via double click on a measure (just like in the...
CrassJoin
7 years agoAdvocate I
Thanks Anonymous
Can you link to an example of this? I tried USERELATIONSHIP with no joy.
Anonymous
7 years agoNot applicable
Using RELATED(TABLE) is tricky with inactive relationships. Here's the code you're after.
New Table =
SELECTCOLUMNS(
'Fact',
"Value For Column 1", RELATED( Dim[Value] ),
"Value For Column 2",
CALCULATE (
CALCULATE (
VALUES ( Dim[Value] ),
'Fact'
),
USERELATIONSHIP ( Dim[Column], 'Fact'[Column 2] ),
ALL ( Dim )
)
)
Assumptions:
- Fact is the fact table with 2 columns, Column 1 and Column 2. Both join on Column to Dim.
- Dim is a dimension table with Column and Value.
- The above retrieves the Value for Column 1 and Column 2 for each of of the rows in Fact.
If you want to know why so, please go to this article and read.
Best
Darek