Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!