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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
thomas_coltrain
Frequent Visitor

DAX command issue with IF and LEFT

Amount Including Tax = If(Left(Lines1[Document Number],3) = "PCM", -1 * Lines1[Total_Amount_Incl_VAT], Lines1[Total_Amount_Incl_VAT])
 
Here is my command above, I am trying to look up a document number using PBI (Business Central Data) and I keep getting this error below.  Where do I put the SUM( at?  
 
"A single value for column 'Total_Amount_Incl_VAT' in table 'Lines1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
 
Thanks for the help!
1 REPLY 1
tamerj1
Super User
Super User

@thomas_coltrain 

This code can be used for a calculated column in the table 'Lines1' not as a measure. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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