Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
tryingtohelp121
Frequent Visitor

Filtering String Column to today's date

Hello all, so currently I am trying to write a measure for a string column so that it filters to only the values for today's date, so I did Date = Max(Date) for the filter, but I don't know how to include the string column I want filtered when it's placed in a table. When I place it in the table, it just shows all the dates,  so the filter is not applying. This isn't an issue for aggregated fields, only for text fields.

 

So how can I write a measure for a string column that is filtered to values for that column only for the most recent date? So that when I put it in the table visual, it only shows those values, thanks.

 

Thanks.

 

2 REPLIES 2
TomMartens
Super User
Super User

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.