Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Adding filter via code to an existing table on desktop - how?

I have an existing table that I created by clicking on a table visualisation, then manually dropped a measure and dimension columns into it.    I would like to add a date filter via a custom measur...
  • Akash_Varuna's avatar
    1 year ago

    Hi Anonymous You can try by creating a measure using SELECTEDVALUE to capture the slicer date (e.g., SelectedDate = SELECTEDVALUE('DateTable'[Date])). Then, create another measure to filter rows, such as FilteredTable = IF(MAX('YourTable'[DateColumn]) = [SelectedDate], 1, 0). Add this measure to the table visual’s filters pane and set it to is 1.