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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

I Need Help in Powerbi Function

now I have a csv file contain number of chapters in a column like 1,2,3 and every chapter have many cells on it in the next column like chapter 1 verse 1 the question is I need a function returns how many characters I read based on the range I input like I read from chapter 1 to chapter 2 verse 10

(I try to do this function in excel like this =SUM((LEN(SUBSTITUTE(A2:A7," ","")))) I expect to input a range and output number of characters the problem above that I don't know how to make the function take an input for each student

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I think you can try this measure in Power BI Desktop.

Measure = 
VAR _ADD = ADDCOLUMNS('Table',"LEN",LEN(SUBSTITUTE('Table'[Page]," ","")))
RETURN
SUMX(_ADD,[LEN])

Sample:

RicoZhou_1-1667371712626.png

Result is as below.

RicoZhou_0-1667371687773.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

I think you can try this measure in Power BI Desktop.

Measure = 
VAR _ADD = ADDCOLUMNS('Table',"LEN",LEN(SUBSTITUTE('Table'[Page]," ","")))
RETURN
SUMX(_ADD,[LEN])

Sample:

RicoZhou_1-1667371712626.png

Result is as below.

RicoZhou_0-1667371687773.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

tamerj1
Super User
Super User

Hi @Anonymous 
Please provide sample data for better understanding of the problem.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.