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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BPTBPTBPT
Helper I
Helper I

Calculate amount of characters + indicate letters

I am struggling a bit with this:

I have a column which should have only 8 numeric values per row.

E.g.

 

72636783

27289911

28889992

 

Unfortunately, there are some errors. Some numbers have more or less characters, and maybe there are even some letters present.

How do I identify all wrongs? 

 

I tried looking at the LEN function, which should give me the number of characters. However, this gives me an error.

Quick measure:

A = LEN ([RelKvKNr])
Error:
(translated): Can't determine the value for RelKvKNr. The column does not exist or there is no current row for this column.
 
Also I think there should be a better solution than using LEN. I would be saitisfied with a measure that gives me an "1" value for every RelKvKNr that does not comply with the rule: 8 numbers
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

Have you tried using LEN as an added column instead?

 

It should work as a new column instead of a measure.

 

Afterwards I would then add another new column:

 

Less than 8 = if ( [length] < 8, 1,0 )

View solution in original post

3 REPLIES 3
BPTBPTBPT
Helper I
Helper I

This worked!

Thanks.

Do you have an idea about how to identificate letters (a,b,c,d..) in the RelKVKNr column?

Anonymous
Not applicable

Hi,

 

I would refer to this video: https://www.youtube.com/watch?v=9Pac_0etueQ if you wanted to split them out by type of string.

 

Let me know if I've helped by giving me a thumbs up or accepting my answer as a solution!

Anonymous
Not applicable

Hi,

 

Have you tried using LEN as an added column instead?

 

It should work as a new column instead of a measure.

 

Afterwards I would then add another new column:

 

Less than 8 = if ( [length] < 8, 1,0 )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.