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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
I'm trying to calculate for % of total margin,
below is sample of data set:
base of the table, the total of percent is 7.44%, however when I do manual calculation from the raw file, it show 66%
when I check again, the total appear as average.
this is the formula I use to calculate margin :
Solved! Go to Solution.
you may take steps below for reference.
1. Create a column:
Col_divide = 'MAIN DATA TABLE'[profit_last] /'MAIN DATA TABLE'[nett_sales]
2. Then create the measure:
Margin =
IF (
HASONEVALUE ( 'MAIN DATA TABLE'[profit_last] ),
SELECTEDVALUE ( 'MAIN DATA TABLE'[Col_divide] ),
SUM ( 'MAIN DATA TABLE'[Col_divide] )
)
Result:
Hope this helps.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
you may take steps below for reference.
1. Create a column:
Col_divide = 'MAIN DATA TABLE'[profit_last] /'MAIN DATA TABLE'[nett_sales]
2. Then create the measure:
Margin =
IF (
HASONEVALUE ( 'MAIN DATA TABLE'[profit_last] ),
SELECTEDVALUE ( 'MAIN DATA TABLE'[Col_divide] ),
SUM ( 'MAIN DATA TABLE'[Col_divide] )
)
Result:
Hope this helps.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@shahidalaila23 , Mark as % is needed
try like
profit margin = divide( SUM('MAIN DATA TABLE'[profit_last]) , SUM('MAIN DATA TABLE'[nett_sales]) )
or
without %
profit margin = divide( SUM('MAIN DATA TABLE'[profit_last]) , SUM('MAIN DATA TABLE'[nett_sales]) )*100