Forum Discussion
Visual filter breaking drill-through
If you use Performance Analyzer to get the query generated for the visual on the drillthrough page and then look at that in DAX Studio you can see that the Appeals[Campaign Code] from the slicer on the main page is being used as a filter, and this results in an empty table. This is being triggered when you add the measure as a filter.
You could disable the keep all filters option and then add the fields which you do want to be kept as filters and I think that should clear the problem
I wanted the Appeals[Campaign Code] to be brought through as a filter, so drilling through from the first line of the table filters to Customer S1 (from the table) and Campaign C1 (from the slicer) which does bring a result. Is that not correct?
Good call on using DAX Studio, the section highlighted in red below is what changes when the visual filter is added. Might take a while to pick through exactly what's happening here - any ideas?
DEFINE
VAR __DS0FilterTable =
TREATAS({"S1"}, 'Customers'[Customer ID])
VAR __DS0FilterTable2 =
TREATAS({"C1"}, 'Appeals'[Campaign Code])
VAR __DS0FilterTable3 =
TREATAS({"A10"}, 'Transactions'[Appeal Code])
VAR __DS0FilterTable4 =
TREATAS({"C4"}, 'Transactions'[Campaign Code])
VAR __SQDS0FilterTable =
TREATAS({"C1"}, 'Appeals'[Campaign Code])
VAR __SQDS0Core =
FILTER(
KEEPFILTERS(
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'Transactions'[Appeal Code],
'Transactions'[Campaign Code],
'Customers'[Customer ID],
__SQDS0FilterTable,
"Communication_Count", IGNORE('Measure Table'[Communication Count]),
"CountRowsTransactions", CALCULATE(COUNTROWS('Transactions'))
)
),
OR(
OR(
NOT(ISBLANK('Transactions'[Appeal Code])),
NOT(ISBLANK('Transactions'[Campaign Code]))
),
NOT(ISBLANK('Customers'[Customer ID]))
)
)
),
"'Transactions'[Appeal Code]", 'Transactions'[Appeal Code],
"'Transactions'[Campaign Code]", 'Transactions'[Campaign Code],
"'Customers'[Customer ID]", 'Customers'[Customer ID],
"Communication_Count", [Communication_Count]
)
),
[Communication_Count] > 0
)
VAR __DS0Core =
CALCULATETABLE(
SUMMARIZE('Communications', 'Communications'[Appeal Code], 'Communications'[Campaign Code]),
KEEPFILTERS(__DS0FilterTable),
KEEPFILTERS(__DS0FilterTable2),
KEEPFILTERS(__DS0FilterTable3),
KEEPFILTERS(__DS0FilterTable4),
KEEPFILTERS(__SQDS0Core)
)
VAR __DS0PrimaryWindowed =
TOPN(501, __DS0Core, 'Communications'[Appeal Code], 1, 'Communications'[Campaign Code], 1)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
'Communications'[Appeal Code], 'Communications'[Campaign Code]