Forum Discussion
Anonymous
5 years agoNot applicable
Total value Measure
Good morning, I need to calculate some values based on the total value of a measure and the final value is not getting me right. I have seen that it is a problem that happens to a lot of people b...
- 5 years ago
Anonymous , Try a measure like
Activity data = sumx(Values(Date[Month]), [Stock Final Last Month] + [Entradas] - [Stock Final])
or
Activity data = sumx(Values(Date[Month Year]), [Stock Final Last Month] + [Entradas] - [Stock Final])
Anonymous
5 years agoNot applicable
Hello again,
My PowerBI works but is very slow. So I decided to improve DAX. I apply the same formula but it doesn't work, why?
New =
Var CodArtigo = FILTER(Cod_Artigo,Cod_Artigo[Cod_Artigo]="60700410")
Var AceGarrEnt =
CALCULATE(
sum(Movimentos[Quant.]),
FILTER(TipoMov,TipoMov[Descrição Movimento]="Recepção compra"),CodArtigo)
Var AceGarrStockFinal =
CALCULATE(
sum(StockFinal[Stock Final]),PREVIOUSMONTH(DATA[Date]),CodArtigo)
var AceGarrSFinalLMonth =
CALCULATE(
sum(StockFinal[Stock Final]),
DATEADD(DATA[Date],-2,MONTH),CodArtigo)
var AceGarrSFinalLMonth2 =
IF(AceGarrStockFinal=BLANK(),BLANK(),AceGarrSFinalLMonth)
var AceGarrDAct = SUMX(VALUES(DATA[Month]), AceGarrSFinalLMonth2 + AceGarrEnt - AceGarrStockFinal)
return
AceGarrDAct
Thanks