Using a filter with a selection measure returning empty table

Viewed 30

I am attempting to filter a table as follows:

Table = Filter(Cashflows, Cashflows[Basis] = Cashflows[Basis Selection 1])

My selection measure is as follows:

Basis Selection 1 = SELECTEDVALUE('Basis CF1'[Value])

Basis CF1 is a slicer I have created from a table. My issue is that the filter returns only an empty table.

Thanks

1 Answers

Note that you cannot calculate tables dynamically at query time that are persisted to the data model. Calculated tables and calculated columns are calculated exactly once, which is at (data set) refresh time.

I suspect that at refresh time there is no valid SELECTEDVALUE for 'Basis CF1'[Value]. This makes the function return a BLANK() (since you have not used the optional second argument), and your FILTER function filters the Cashflows table on rows where Cashflow[Basis] is blank. Perhaps there are no such rows, leading to a blank table being returned.

Related