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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
andrius_pfa
New Member

Count ID's from text

Hello, Im new to Power Bi , and I need help. I want to create column and count how many ID's begins with _A.

Example:

 

ing-WoX8/1/1_A1385556-Xdu Trou6_A1407390-Maon - 2
S5/1/1_A1385448-VALENANI - 1
tton Bld-1KN/5_A1400101-FONth/2/1_A1428673-GIANSSI_A153748 - 3

 

thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @andrius_pfa ,
you can use this formula for creating this column.

_A count = 
VAR Search_string = "_A"
RETURN
DIVIDE(
    LEN('Table'[Value]) - LEN(SUBSTITUTE('Table'[Value],Search_string,BLANK())),
    LEN(Search_string),
    0
)

Aditya_Meshram_0-1649673390687.png


Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @andrius_pfa ,
you can use this formula for creating this column.

_A count = 
VAR Search_string = "_A"
RETURN
DIVIDE(
    LEN('Table'[Value]) - LEN(SUBSTITUTE('Table'[Value],Search_string,BLANK())),
    LEN(Search_string),
    0
)

Aditya_Meshram_0-1649673390687.png


Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.