Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a simple data model of pizza sales with three tables:
1. Fact_Sales
2. DIM_Product
3. DIM_Ingridients
Every Pizza has a specific amount of ingredients.
I would like to know how many ingredients I use per month based on sales of pizzas.
Sorry, I can't get how to build this calculation.
Solved! Go to Solution.
Try
Ingredient Usage =
SUMX (
'DIM_Ingredients',
VAR Sales =
SUMX ( RELATEDTABLE ( 'FACT_Sales' ), 'FACT_Sales'[quantity] )
VAR Result = Sales * 'DIM_Ingredients'[Usage, KG]
RETURN
Result
)
Try
Ingredient Usage =
SUMX (
'DIM_Ingredients',
VAR Sales =
SUMX ( RELATEDTABLE ( 'FACT_Sales' ), 'FACT_Sales'[quantity] )
VAR Result = Sales * 'DIM_Ingredients'[Usage, KG]
RETURN
Result
)
Unfortunately, I got blank values as a result.
I'm sharing a dataset just for any case.
Link
The relationship between sales and product is invalid - the keys in the product table include the size whereas the sales table doesn't.
Thank you! You're a life saviour.
A silly mistake
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
22 | |
10 | |
10 | |
9 | |
7 |