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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors