Forum Discussion

thomas_coltrain's avatar
thomas_coltrain
Frequent Visitor
3 years ago

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