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
Byzbkr
Frequent Visitor

Filtered Legends

Hi,

 

I want to create line chart and add specific one column as a legends also slicer choices. But charachter lengths varies in the column that I want to add.  However I just want to take the rows its length equals to 3. Both for legend and slicer. How can I do that?

 

Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Byzbkr ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a measure as below to judge if the length of that column value is equal to 3

Flag = IF ( LEN ( SELECTEDVALUE ( 'Table'[category] ) ) = 3, 1, 0 )

2. Apply the visual-level filter for both the line chart and slicer with the condition(Flag is 1)

yingyinr_0-1646643551944.png

If my above understanding is wrong, please correct me. And later please share some sample data, backend logic and your expected result with special examples. Thank you.

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Byzbkr ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a measure as below to judge if the length of that column value is equal to 3

Flag = IF ( LEN ( SELECTEDVALUE ( 'Table'[category] ) ) = 3, 1, 0 )

2. Apply the visual-level filter for both the line chart and slicer with the condition(Flag is 1)

yingyinr_0-1646643551944.png

If my above understanding is wrong, please correct me. And later please share some sample data, backend logic and your expected result with special examples. Thank you.

Best Regards

amitchandak
Super User
Super User

@Byzbkr , Not very clear. If you just want a three-digit from the current column name. You need to create a new column

 

example

3 char =  left([column],3)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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