Forum Discussion
Excel in Dax
Thanks for your answer.
I managed to find what I was searching for, using another formula.
You're right, my calculate is very much a "this row and the previous row", however, each row has a specific criteria and regarding the amount of data I can't use such a formula. Also I wanted to have a sum of two average, here what I did:
To succeed I created two new columns, excluding all the values except those which were matching my criteria (using = IF('Table'[xxx]="abcd";'Table'[yyy];0) ). In addition to that, I created a matching key (='Table'[zzz]&'Table'[www]&'Table[vvv])
Then, I wrote a measure
Average of 'Table'[uuu] by MatchingKey =
AVERAGEX(
KEEPFILTERS(VALUES('Table'[MatchingKey]));
CALCULATE(SUM('Table'[uuu]))
)
This made the sum of the average of values matching the same criterias.
I don't really know whether this is the simpliest solution but it works :)
Hi Joak,
Could you please mark the proper answer as solution if it's convenient for you? That will be a help to the others.
Best Regards!
Dale