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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
BPTBPTBPT
Helper II
Helper II

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 II
Helper II

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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