Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Good morning,
I have the following calculated columns:
Number of Packages 4 pax = if('Ingredients'[Qty] <= 'Ingredients'[Package Content];1;2)
Number of Packages 3 pax = if(('Ingredients'[Qty]/4)*3 <= 'Ingredients'[Package Content];1;2)
Number of Packages 2 pax = if(('Ingredients'[Qty]/4)*2 <= 'Ingredients'[Package Content];1;2)
Number of Packages 1 pax = if(('Ingredients'[Qty]/4) <= 'Ingredients'[Package Content];1;2)
Is there any way to make one measure for this instead of 4 calculated columns?
Thanks for your help.
Kind regards
Solved! Go to Solution.
Hi @SL_1983
Can you try changing that measure to below (you will not need the 4 columns you created):
Kostprijs Per Aangekochte Verpakking = SUMX ('Ingrediënten', ('Ingrediënten'[Verpakking Gewicht Laagste Prijs] * IF(( 'Ingrediënten'[Recept Hoeveelheid 4 Personen] / 4 ) * SELECTEDVALUE ( 'Slicer Table'[Recept aantal Personen] ) <= 'Ingrediënten'[Verpakking Gewicht Laagste Prijs], 1, 2)) * RELATED ( 'Product'[Goedkoopste Prijs] ))
Hope that helps!
Hello,
This is the link to the pbix file (however it is in Dutch): https://1drv.ms/u/s!AuaqHTxLCZ_h0wB8UX412RXRsm88?e=iMha2O
The 4 colums have been created in the table Ingrediënten.
Then I created a measure: "Kostprijs Per Aangekochte Verpakking" to be able to calculate the cost of the recipe based on the number of packages that have to be bought to make the dish.
Kind regards,
Hi @SL_1983
Can you try changing that measure to below (you will not need the 4 columns you created):
Kostprijs Per Aangekochte Verpakking = SUMX ('Ingrediënten', ('Ingrediënten'[Verpakking Gewicht Laagste Prijs] * IF(( 'Ingrediënten'[Recept Hoeveelheid 4 Personen] / 4 ) * SELECTEDVALUE ( 'Slicer Table'[Recept aantal Personen] ) <= 'Ingrediënten'[Verpakking Gewicht Laagste Prijs], 1, 2)) * RELATED ( 'Product'[Goedkoopste Prijs] ))
Hope that helps!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |