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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors