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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
DSmith4
Helper II
Helper II

Sum of text values or convert text to number?

Hi, I am trying to sum the dollar amount by vendor.
Our vendor nubmers are alphanumeric so when I do the sum formula I get an error "cannot convert value of type text to type true/false"

 

Is there a way around this? I am trying to create a column so I can add a page level filter for only vendors that have an amount of 100,000 or greater.

I've tried converting vendor to value but it does not work either.

 

Formulas and screenshots are below.

 

Can anyone help?

 

Vendor Sum = CALCULATE(SUM('GRIR Cleared Items'[Amount in LC]),FILTER('GRIR Cleared Items','GRIR Cleared Items'[Vendor]))
 
VendorValue = VALUE('GRIR Cleared Items'[Vendor])
 
2019-10-23_12-43-40.png
 
2019-10-23_12-41-55.png
1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@DSmith4 ,

 

In the first measure, you should add the condition like below:

Vendor Sum =
CALCULATE (
    SUM ( 'GRIR Cleared Items'[Amount in LC] ),
    FILTER ( 'GRIR Cleared Items', 'GRIR Cleared Items'[Vendor] = Condition )
)

About the second measure, please check if the value in column 'GRIR Cleared Items'[Vendor] is text format like "1", "2", "3", etc.

 

Community Support Team _ Jimmy Tao

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

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@DSmith4 ,

 

In the first measure, you should add the condition like below:

Vendor Sum =
CALCULATE (
    SUM ( 'GRIR Cleared Items'[Amount in LC] ),
    FILTER ( 'GRIR Cleared Items', 'GRIR Cleared Items'[Vendor] = Condition )
)

About the second measure, please check if the value in column 'GRIR Cleared Items'[Vendor] is text format like "1", "2", "3", etc.

 

Community Support Team _ Jimmy Tao

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

 

tarunsingla
Solution Sage
Solution Sage

You have tried to use the Vendor field in a Filter condition. Filter condition expects the expression to be true/false.

 

1. In your Vendor SUM calculated measure, drop the filter and instead apply filter in your visual (or Page level or Report Level) on this calculated measure.

 

2. VALUE function does not work that way. It helps convert numbers (that are stored as text), to numbers.

Hi,

 

This field does not allow me to place in a filter

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors