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
NDRS
Frequent Visitor

SUM table, FILTER and NOT FILTER = Error message

Hi,
 
Im tryging to create a measure to SUM a table, filter on "lagerställekod" and Exclude A, B, and C from another table and column (The tables have an Many-to-many relationship if thats important).  On below code i get error message "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.". What does that mean in this case? Is it possible to use the NOT-function to exclude? 
 
COGS CWH Excluding A, B, C =
CALCULATE (
    SUM ( 'Artikeltransaktion (2)'[Kost.belopp (aktuellt)] ),
    FILTER (
        'Artikeltransaktion (2)',
        'Artikeltransaktion (2)'[Lagerställekod] IN { "6", "13", "17", "18"}),       
         NOT FILTER(Artikellista, Artikellista[Produktbokföringsmall] IN {"A", "B", "C"})   

 
Thanks in advance!
1 REPLY 1
Anonymous
Not applicable

Hi @NDRS 

 

The FILTER function returns a table, while the NOT function cannot be applied directly to the table. 

 

 

Best Regards,

Jayleny

 

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

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

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!

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.

Users online (25)