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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Dynamic Filter values

I have a table with single column that I have dynamically bind to M query parameter.

Column1

now-1d

now-2d

 

I want to filter the values based on column1 but i want to show value as Last 1day, Last 2 day on filter visual.

Suggest a solution if possible?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

You can create a measure as below to get it, please find the details in the attachment.

Measure = 
VAR _selday =
    SELECTEDVALUE ( 'Table'[Column1] )
VAR _a =
    IFERROR ( SEARCH ( "-", _selday ), 0 )
RETURN
    CONCATENATE (
        "Last ",
        CONCATENATE ( MID ( _selday, _a + 1, LEN ( _selday ) - _a - 1 ), " day(s)" )
    )

yingyinr_0-1650859828326.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

You can create a measure as below to get it, please find the details in the attachment.

Measure = 
VAR _selday =
    SELECTEDVALUE ( 'Table'[Column1] )
VAR _a =
    IFERROR ( SEARCH ( "-", _selday ), 0 )
RETURN
    CONCATENATE (
        "Last ",
        CONCATENATE ( MID ( _selday, _a + 1, LEN ( _selday ) - _a - 1 ), " day(s)" )
    )

yingyinr_0-1650859828326.png

Best Regards

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.