Forum Discussion
Filtering String Column to today's date
Hey tryingtohelp121 ,
first of all, you should not use different data types, this means when a column is representig a date it's a good practice to use Power Query to change the data type of this column to date. If possible this change should happen even more upstream.
Next, you can create a measure that is using CALCULATE to change the given filter context in a way that only the selected date is considered.
If you are using the "string" column as a row header or column header in matrix or table visual then you can also create measure that checks the header value and returns 1 if there is a match between the header value and the slicer selection. Then you can add this measure to the visual level pane and configure the filter in a way that says measure equals 1.
Hopefully, this provides some ideas on how to tackle your challenge.
Regards,
Tom
- tryingtohelp1213 years agoFrequent Visitor
Hello, sorry I have explained it incorrectly.
I have both a Date column with date data type, lets call it Column A and a string column, let's call it Column B.
I made a measure that concatenates Column B with nothing along with calculate in order to filter it to the max date such as for example: CALCULATE(CONCATENATE(A), FILTER(TABLE, B = MAX(B)) and called it Measure 1
When I put Both the date column and measure 1 together in the same table, the table still shows for all dates, not just the most recent dates. I would only like the most recent date to be shown for column A.