Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi team, I'm currently working on a scenario in Power BI where I'm aiming to dynamically calculate and display the length (number of characters) of the values in the first column within a dedicated column of the table visualization. This behavior should be triggered based on the user's selection in a slicer component. I have attached a screenshot below,Let's say we have col_1 and we need number of characters in col_2 based on slicer selection. If we enter 3 then col_2 will display only three characters from col_1
Solved! Go to Solution.
Hi @Anonymous ,
Please try the following methods and check if they can solve your problem:
1.Create the simple table.
2.Create the table for slicer.
3.Drag the number into the slicer visual.
4.Create the new measure to filter. Drag the measure into the table visual.
Displayed Characters =
VAR SelectedLength = SELECTEDVALUE('Table number'[Number of characters])
VAR character = SELECTEDVALUE('Table'[Column1])
VAR colum2 = LEFT(character, SelectedLength)
RETURN
colum2
colum2
5.Select the number in the slicer visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try the following methods and check if they can solve your problem:
1.Create the simple table.
2.Create the table for slicer.
3.Drag the number into the slicer visual.
4.Create the new measure to filter. Drag the measure into the table visual.
Displayed Characters =
VAR SelectedLength = SELECTEDVALUE('Table number'[Number of characters])
VAR character = SELECTEDVALUE('Table'[Column1])
VAR colum2 = LEFT(character, SelectedLength)
RETURN
colum2
colum2
5.Select the number in the slicer visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , For the slicer please use a numeric parameter, Assuming the Selected Parameter is parameter based selectedvalue(Parameter[Value])
Create a new measure =
Left(Max(Table[Col1]) , [Selected Parameter])