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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
eryka_90
Helper I
Helper I

Dax having an error

Hi All,

 

How can we resolve from getting an error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value". I use below DAX measure:

 

# VendorBalances =
SUMMARIZE(
'Vendor All Document',
'Vendor All Document'[Vendor],
"VendorBalance",
CALCULATE(
SUMX(
'Vendor All Document',
'Vendor All Document'[Amount USD] - 'Vendor All Document'[# Total Paid Amount]
)
)
)
 
Thank you
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @eryka_90 ,
Based on your description, you are trying to calculate the difference between what the provider will spend in total and what it has already spent. Where you want to show the data by each supplier. In your dax you are using the SUMMARIZE function, which always returns a table, which is why there are multiple columns reporting errors. Depending on your needs, the first thing you can do is put this dax into an expression that creates a new table. Or you can try the following dax

Update = 
CALCULATE(
    SUM('Vendor All Document'[Amount USD]),
    ALLEXCEPT(
        'Vendor All Document',
        'Vendor All Document'[Vendor]
    )
)-[# Total Paid Amount]

Fianl output

vheqmsft_0-1716259815319.png

 

Best regards,
Albert He

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

4 REPLIES 4
Anonymous
Not applicable

Hi @eryka_90 ,
Based on your description, you are trying to calculate the difference between what the provider will spend in total and what it has already spent. Where you want to show the data by each supplier. In your dax you are using the SUMMARIZE function, which always returns a table, which is why there are multiple columns reporting errors. Depending on your needs, the first thing you can do is put this dax into an expression that creates a new table. Or you can try the following dax

Update = 
CALCULATE(
    SUM('Vendor All Document'[Amount USD]),
    ALLEXCEPT(
        'Vendor All Document',
        'Vendor All Document'[Vendor]
    )
)-[# Total Paid Amount]

Fianl output

vheqmsft_0-1716259815319.png

 

Best regards,
Albert He

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

 

ryan_mayu
Super User
Super User

@eryka_90 

Do you want to create a measure? SUMMARIZE is to use DAX to create a table.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@ryan_mayu 

 

Yes, i want to create a measure. 

Could you assist what is the correct function to use?

could you pls provide the sample data and expected output?

 

maybe you can try 

 

# VendorBalances =
VAR tbl=SUMMARIZE(
'Vendor All Document',
'Vendor All Document'[Vendor],
"VendorBalance",
CALCULATE(
SUMX(
'Vendor All Document',
'Vendor All Document'[Amount USD] - 'Vendor All Document'[# Total Paid Amount]
)
)
return sum([VendorBalance])

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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