Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am trying to calculate the total recipe cost price for each recipe. I used the below DAX formula as shown in the image and also listed below but I am not getting the correct result. I am trying to acheive this in a Power Bi Matrix visual. Please help.
Recipe Total Cost Price = Calculate(SUM('All Recipes'[Ingredient_Cost_Price]), ALLEXCEPT('All Recipes','All Recipes'[Recipe Name]))
Solved! Go to Solution.
HI @sustar2020,
You can try to use the following measure formula if that is suitable for your requirement:
Recipe Total Cost Price =
CALCULATE (
SUM ( 'All Recipes'[Ingredient_Cost_Price] ),
ALLSELECTED ( 'All Recipes' ),
VALUES ( 'All Recipes'[Recipe Name] )
)
Regards,
Xiaoxin Sheng
Hi, sorry, it didn't work. It's giving an empty column.
HI @sustar2020,
You can try to use the following measure formula if that is suitable for your requirement:
Recipe Total Cost Price =
CALCULATE (
SUM ( 'All Recipes'[Ingredient_Cost_Price] ),
ALLSELECTED ( 'All Recipes' ),
VALUES ( 'All Recipes'[Recipe Name] )
)
Regards,
Xiaoxin Sheng
@sustar2020 , if Ingredient_Cost_Price is a column this seems fine to me
But you can try
Recipe Total Cost Price = Calculate(SUM('All Recipes'[Ingredient_Cost_Price]), filter(allselected('All Recipes') ,'All Recipes'[Recipe Name] = max('All Recipes'[Recipe Name]) ))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
User | Count |
---|---|
49 | |
40 | |
18 | |
14 | |
13 |
User | Count |
---|---|
102 | |
55 | |
28 | |
18 | |
13 |