Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I'm trying to write a measure that calculates the margin.
I wrote the code and am getting the following error:
A single value for column 'amount' in table 'Module Sales with Inventory' 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.
I have attached the measure below. Any help would be greatly appreciated.
Solved! Go to Solution.
Hi,
Please try something like below.
Margin =
DIVIDE (
SUMX (
'Module Sales with Inventory',
'Module Sales with Inventory'[amount] - 'Module Sales with Inventory'[cost amount]
),
SUMX ( 'Module Sales with Inventory', 'Module Sales with Inventory'[amount] )
) * 100
Hi,
Please try something like below.
Margin =
DIVIDE (
SUMX (
'Module Sales with Inventory',
'Module Sales with Inventory'[amount] - 'Module Sales with Inventory'[cost amount]
),
SUMX ( 'Module Sales with Inventory', 'Module Sales with Inventory'[amount] )
) * 100
That seems to have worked!
Thank you so much!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |