The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello -
I am having trouble with the profit margin calculation. Here are my measures:
1. Total Revenue = SUMX( Sales, Sales[Order qty] * Sales[unit price] )
2. Total Cost = SUMX( Sales, Sales[Order qty] * Sales[unit cost] )
3. Total Profit = [Total Revenue]-[Total Cost]
4. Profit Margin = DIVIDE( [Total Profit], [Total Revenue], 0 )
However, when I show profit margin in a visual, all of the items in the category have the same profit margin. Any suggestions?
Thanks
It turns out the dataset was manually generated and the profit margin calc was indeed accurate. Sorry for the confusion.
@CMajka8 This generally indicates a missing relationship somewhere but if the Total Revenue and Total Cost columns in your visual are the measures you indicate that's rather strange.
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
27 | |
12 | |
12 | |
12 | |
6 |