Forum Discussion
Anonymous
10 years agoNot applicable
Filter on the measure.
I need to create a measure that makes a calculation using the SUMX function but also has a filter, for example SUMX (table; max (year column); column1 * column2) and will also need to create a measure that do the same thing however using the previous year, for example SUMX (table, (max (year column) - '); * column1 column2), made several attempts however unsuccessfully.
29 Replies
- Greg_Deckler
Community Champion
The general formula for a measure like that is:
SUMX(FILTER(...),...)
Or you can use CALCULATE
CALCULATE(SUM(...),FILTER(...))
without sample data, not sure how much more I can help.
- AnonymousNot applicable
I'm trying it
(SUMX (FILTER (DMEGF_Ano; max (DMEGF_Ano [Year])) facts, facts[Vl_PedidoCompra] * facts [Qtd_PedidoCompra]))
but it is giving error- Sean
Community Champion
Anonymous try this
delete the facts and add => comma and ( => , (