I have the below but where the filter is set to "Alabama", I would like that filter to be tied to a cell value where the user can change the location from a drop down and the table refresh. Is that possible?
DEFINE
VAR __DS0FilterTable =
TREATAS({"Alabama"}, 'Organization'[OpCo])
VAR __DS0Core =
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'Organization'[OpCo],
'Clients'[Client Code],
'Clients'[Name],
__DS0FilterTable,
"CountRowsFactPolicy", COUNTROWS('FactPolicy')
)
),
OR(
OR(
NOT(ISBLANK('Organization'[OpCo])),
NOT(ISBLANK('Clients'[Client Code]))
),
NOT(ISBLANK('Clients'[Name]))
)
)
),
"'Organization'[OpCo]", 'Organization'[OpCo],
"'Clients'[Client Code]", 'Clients'[Client Code],
"'Clients'[Name]", 'Clients'[Name]
)
VAR __DS0BodyLimited =
TOPN(500000, __DS0Core, 'Organization'[OpCo], 1, 'Clients'[Client Code], 1, 'Clients'[Name], 1)
EVALUATE
__DS0BodyLimited
ORDER BY
'Organization'[OpCo], 'Clients'[Client Code], 'Clients'[Name]
DEFINE
VAR __DS0FilterTable =
TREATAS({"Alabama"}, 'Organization'[OpCo])
VAR __DS0Core =
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'Organization'[OpCo],
'Clients'[Client Code],
'Clients'[Name],
__DS0FilterTable,
"CountRowsFactPolicy", COUNTROWS('FactPolicy')
)
),
OR(
OR(
NOT(ISBLANK('Organization'[OpCo])),
NOT(ISBLANK('Clients'[Client Code]))
),
NOT(ISBLANK('Clients'[Name]))
)
)
),
"'Organization'[OpCo]", 'Organization'[OpCo],
"'Clients'[Client Code]", 'Clients'[Client Code],
"'Clients'[Name]", 'Clients'[Name]
)
VAR __DS0BodyLimited =
TOPN(500000, __DS0Core, 'Organization'[OpCo], 1, 'Clients'[Client Code], 1, 'Clients'[Name], 1)
EVALUATE
__DS0BodyLimited
ORDER BY
'Organization'[OpCo], 'Clients'[Client Code], 'Clients'[Name]