Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I need to use LEFT() function for each row in table so as a measure in 'row context'. Because my report is based on powerBI dataset, I am unable to use LEFT() as a new column (this operation is unavailable)
Any idea how to do it?
thx a lot !
Solved! Go to Solution.
Hi @Mariusz
I would like get something like this
Batch No. | LEFT(Batch No.;3) |
123123 | 123 |
123456 | 123 |
123789 | 123 |
987987 | 987 |
987654 | 987 |
987321 | 987 |
But I cannot solve it as 'new column', where it is easy to set up
Hi @ph
Please see the below
Measure = LEFT( MAX( 'Table'[Batch No.] ), 3 )
[First 3 Chars for Batch No.] = -- measure var __oneBatchVisible = HASONEFILTER( T[Batch No.] ) var __chars = if ( __oneBatchVisible, var __currentBatch = VALUES( T[Batch No.] ) var __first3Chars = left( __currentBatch, 3 ) return __first3Chars ) RETURN __chars
Best
D.
Hi @Mariusz
I would like get something like this
Batch No. | LEFT(Batch No.;3) |
123123 | 123 |
123456 | 123 |
123789 | 123 |
987987 | 987 |
987654 | 987 |
987321 | 987 |
But I cannot solve it as 'new column', where it is easy to set up
[First 3 Chars for Batch No.] = -- measure var __oneBatchVisible = HASONEFILTER( T[Batch No.] ) var __chars = if ( __oneBatchVisible, var __currentBatch = VALUES( T[Batch No.] ) var __first3Chars = left( __currentBatch, 3 ) return __first3Chars ) RETURN __chars
Best
D.
Hi both
thank you for your help 🙂
I accept as solution the first one, because it is easier to understand it, second one is more complicated ..but works fine !!
Hi @ph
Please see the below
Measure = LEFT( MAX( 'Table'[Batch No.] ), 3 )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |