Forum Discussion
Adding filter via code to an existing table on desktop - how?
- 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.
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.
- Anonymous1 year agoNot applicable
Hi, thank you for your help.
My slicer has an output of 4 ( the month of april ), which i have confirmed is correct
I get my [month behind] using this measure : [month behind] = SELECTEDVALUE('Calendar'[Month]) -1
which gives value of 3 ( month of march )When I drag and drop [month behind] onto the desktop , I see a value of 3, so that is OK.When I create this new measure :FilteredTable = IF(MAX('Calendar'[Month]) = [month behind], 1, 0)and set it to 1 as you suggested, unfortunately I get no data unfortunately ( the output is blank ).Not sure why ?