Forum Discussion
Compare value by highest selected month
Hi
I need to compare the monthly value with the value of the highest month selected, I'm using the measurements:
MaiorMesSelecionado = CALCULATE( MAX(VENDAS[MES]), ALLSELECTED(VENDAS) )
ValorMaiorMesSelecionado = CALCULATE(SUM(VENDAS[VALOR]),FILTER(VENDAS,VENDAS[MES] = [MaiorMesSelecionado]))
If I set the month 11, everything works
ValorMaiorMesSelecionado = CALCULATE(SUM(VENDAS[VALOR]), FILTER(VENDAS,VENDAS[MES] = 11))
, but when I use the measure of the biggest month, nothing works
this is my report
DATA
Need help
I found the error
Previous measure (wrong): MaiorMes = CALCULATE(MAX(producao[MESREFERENCIA]);ALLSELECTED(producao[MESREFERENCIA]))
Correct Measure: MaiorMes = CALCULATE(MAX(producao[MESREFERENCIA]);ALLSELECTED(producao))in the function ALLSELECTED, I added the table field, and I should have just added the table
1 Reply
- andre1981New Member
I found the error
Previous measure (wrong): MaiorMes = CALCULATE(MAX(producao[MESREFERENCIA]);ALLSELECTED(producao[MESREFERENCIA]))
Correct Measure: MaiorMes = CALCULATE(MAX(producao[MESREFERENCIA]);ALLSELECTED(producao))in the function ALLSELECTED, I added the table field, and I should have just added the table