Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I have attached images and labelled 4 measures below and the resulting output. Measure 1 and 2 are related, and measure 3 and 4 are related. Measure 1 and 3 are similar and measure 2 and 4 are similar, but I am trying to determine why measure 4 is returning a blank when measure 2 works correctly. Does it have to do with filter context? All of them work except for Measure 4.
Measure 4 (Does Not Work):
Measure 3 (Works Correctly):
Measure 2 (Works Correctly):
Measure 1 (Works Correctly):
Hi @austinb97 ,
Try to adjust your measure4:
Price Setter(Wish Asset removal)=
calculate(min(Meritorder[Price],
Filter(all(MeritOrder),MeritOrder[Cumulative Available MW]>>=[Fake Dispatched Available MW]))
Since I don't have your specific file, I use a similar model:
see the below:
Return(test2) is blank:(Incorrect)
return test:(correct)
When I add all to filter:(correct value)
refer :all
If question still not solved ,could you pls share your pbix file?
Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Best Regards
Lucien
Yes. It's likely due to filter context complications.
If you expect [Fake Dispatched Available MW] to be the same value for each row you are iterating over in the FILTER, then the solution is simple; calculate it once rather than for each row:
Price Setter (With Asset Removal) =
VAR Fake = [Fake Dispatched Available MW]
RETURN
CALCULATE (
MIN ( MeritOrder[Price] ),
FILTER ( MeritOrder, Fake <= MeritOrder[Cumulative Available MW] )
)
If the measure should be dependent on the row context from the FILTER iterator, then things get more complicated.
Thanks, however this does not appear to fix my issue with the BLANK getting returned. I just can't understand why Measure 2 works correctly and Measure 4 does not with essentially the same logic.
What if you replace [Fake Dispatched Available MW] with the hardcoded value 8953? Do you get a non-blank or are you just filtering out the whole table?
Note: You are playing with fire having ALLSELECTED inside of a FILTER iterator. ALLSELECTED is really complicated to understand in such situations.
I appreciate the suggestion. You can see the result below, it does work as expected in this case. There is just some sort of issue with how the measure is being passed into this formula. When its hardcoded in, then it works. Any idea how to rewrite my "Measure 3" from above? You are probably correct that its the ALLSELECTED causing the issue. Basically I am using a slicer to choose an "AssetName" then I want it to sum the corresponding "Available MW" and pass it into my "Measure 4"
It's doesn't make sense to me why this works but my initial suggestion doesn't if 8953 is the result of a working Measure 3.
Does anything change if you use VALUES instead of ALLSELECTED? If you don't have filter context from the visual (e.g. rows/column in a matrix), these should behave similarly.