This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi Guys!
I need to use different relationships within the same iterative function.
What I need is the below calculation, however where the all('Invoice Line');all('Purchase Order') only is applied to [Finished demand per bag]
Another attempt was made, what is weird is that the filtercontext added in the variable is removed when used in the return. All measures work like intended when used seperately.
TEST CM Total Cost Sold Bags =
var Finished_demand_per_bag = calculate(sumx(mainReseptitSQL;mainReseptitSQL[Finished demand per bag]);all('Invoice Line');all('Purchase Order'))
return
sumx(mainReseptitSQL;Finished_demand_per_bag *([CM Kg price after reduced]/[CM Yield])*[CM Sold No of Bags])
I tried making a measure of the first
[Finished demand per bag]
So it went like this
CM Finished demand per bag = calculate(sumX(mainReseptitSQL;mainReseptitSQL[Finished demand per bag]);all('Purchase Order');all('Invoice Line'))
Then I nested it so it looked like this.
TEST CM Total Cost Sold Bags = calculate(sumx(mainReseptitSQL;mainReseptitSQL[CM Finished demand per bag]*([CM Kg price after reduced]/[cm Yield])*[CM Sold No of Bags]))
Each individual measure gives me a the expected value. However, when I put them all in the same measure I get unexpected results as if the first filter context in the first measure wasn't there.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 38 | |
| 28 | |
| 27 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 37 | |
| 32 | |
| 26 | |
| 25 |