Forum Discussion
jrscaletta
Helper II
4 years agoComparing TEXT vs INT not allowed.. but I'm using FORMAT!!
Hi!! obtain an error comparing "TEXT" vs "INT", but I'm using FORMAT too, I don't understand. I want this measure returns weighted average by date,,, ideas? Thanks you! My measure is: Weigh...
- 4 years ago
jrscaletta
You can useWeighted Averaged Date Movement type 1 = FORMAT ( SUMX ( FILTER ( Hoja1, Hoja1[MovementType] = 1 && Hoja1[ArticleType] = 1 ), Hoja1[Date] * Hoja1[AnimalsNumber] ) / [AnimalsMovementType1], "General Date" )
jrscaletta
Helper II
4 years agoHi Tamerj
I attach basic and easy compensive sample file. Thanks! Download file (By Wetransfer): https://we.tl/t-0NhKxNu8Ql
As you can see, the weighted average date is not correct. It shows 2045 year!! My data is all 2022.
Thanks!!
tamerj1
Community Champion
4 years agojrscaletta
You can use
Weighted Averaged Date Movement type 1 =
FORMAT (
SUMX (
FILTER ( Hoja1, Hoja1[MovementType] = 1 && Hoja1[ArticleType] = 1 ),
Hoja1[Date] * Hoja1[AnimalsNumber]
) / [AnimalsMovementType1],
"General Date"
)- jrscaletta4 years ago
Helper II
It works!!! Thanks you so much for your help!