Forum Discussion
Lookupvalue before calculate gross margin from variable costs
Hi all,
I have been struggling with this for a while now. I would like to calculate gross margin on revenue with the following setup:
- 1 table 'Date' connected to:
- 2 sources of orders with exact date & product code, where revenue is SUM(SALES[revenue]) + SUM('OPEN SALES'[revenue])
- 1 table 'Variable Costs' per month and per product range
- 1 table 'Products' to link a product code (in orders) to a product range, connected to 'Variable Costs', 'Sales', and 'Open Sales'
The idea is to calculate GM per product range, or geography, or sector, but I cannot do that with a single measure unless I can have, maybe, a lookupvalue for each single line of order.
Thank you in advance for your help!
Best regards,
noelle
8 Replies
- amaniramahi
Helper V
can you please put sample data or screen shots for the tables
- Noelle
Helper I
Here is screen shot of the table (keys table)
'Product''Date''VariableCosts'
- v-juanli-msft
Community Support
Hi Noelle
Check if my pbix satisfy your needs.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Noelle
Helper I
Good Morning Maggie v-juanli-msft
I have tried your connexion and measure.
Variable costs are expressed per product range, and not product code, so I cannot have a 1:* relation between 'product' and 'variable costs'. product range is a group from product code. Let me prepare a sample for you, I guess that will be better than my previous screenshots.
Best regards,
Noelle
- Noelle
Helper I