Forum Discussion

jrscaletta's avatar
jrscaletta
Icon for Helper II rankHelper II
4 years ago
Solved

Comparing 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...
  • tamerj1's avatar
    tamerj1
    4 years ago

    jrscaletta 
    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" 
    )