Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
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)
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
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)
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
@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)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 57 | |
| 48 | |
| 35 | |
| 34 | |
| 21 |
| User | Count |
|---|---|
| 143 | |
| 122 | |
| 100 | |
| 80 | |
| 57 |