Forum Discussion
Measure calculated two times in filtered visuals
nhch Well, it likely has to do with your use of ALLSELECTED, perhaps one of the more complex and esoteric functions in all of DAX in terms of exactly what it considers as "selected". Will see if I can recreate and test.
- nhch2 years ago
Helper I
Thank you!
It should be pretty easy to recreate, i'm on the last version, the datamodel and the formula are pretty straight forward. Tell me if i need to upload the .pbix ^-^- nhch2 years ago
Helper I
Greg_Deckler i did a bit of debugging and there is, in fact, a double evaluetion of the measurement. First in order to filter the data and secondly to display the value. Validity of the forumula aside, isn't this a big performance issue? filtered measurements could run twice as fast if instead of re evalueting them pbi just memorize the values!
here it is the log (sorry if the numbers are in italian ^-^):
First call:Second call:
P.S.
This is how powerbi builds the query, you can see the double evaluation marked in red
Thanks ✨