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 agoThnanks you very much! Now it works, but the result isn't correct, I obtain date "10/8/2143", when my most recent date is "02/05/2022"...
Ideas? Thanks
- tamerj14 years ago
Community Champion
What are you trying to calculate?
- jrscaletta4 years ago
Helper II
Hi tamerj1!! Thanks for your reply!
I want to calculte the average date ponderated by AnimalsNum with criteria.
All my movements are on the MOVIGRANJ table (date too).
I have 4 important fields for this:
- DATE (Date)- NUM ANIMALS (Integer)
- MOVEMENTTYPE (Integer)
- ARTICLETYPE -or product- (Integer)
- FARM (integer)
I need to calculate the average date ponderated by AnimalsNum with criteria on fields "MOVEMENTTYPE = 3" and "ARTICLETYPE = 1".
- tamerj14 years ago
Community Champion
Can you share screenshot of your source data table or provide sample data?