Forum Discussion
MattBI
3 years agoRegular Visitor
Challenges with ALLSELECTED and iterators
So everything I've read says "stay away from ALLSELECTED inside iterators" because it has complex functionality and it probably won't do what you want it to (because it will activate the iterators sh...
hnguy71
Super User
3 years agoHi MattBI ,
I don't think there's actually really an issue in using any functions within Power BI. Sure, there's always a preference over another but if your results are right and it doesn't bog down your model / visuals then go ahead and use it.
For your second measure, I would perhaps add the calculation within the summarize table such as this:
VAR summarizeTable =
SUMMARIZE(
SourceData,
SourceData[Period],
SourceData[client],
Products[DESCRIPTION],
Sales[DESCRIPTION],
"@Result", [Weight] * [Benchmark]
)
RETURN
SUMX(summarizeTable, [@Result])
MattBI
3 years agoRegular Visitor
Hmmm... that didn't return any results.
I've heard that it's not a good pratice to create computed columns in a SUMMARIZE statement, so I added an ADDCOLUMNS to it, which worked, but unfortunately, that has the exact same behavior as my original measure definition.