Forum Discussion
Luis_Caston
2 years agoHelper III
Calculate filtering text column by range
Hi guys! I'm hesitanting: I've a column [CodigoFinca] with this text values: 01,02,03,04,05,06,07,08,09,10,MIXED, ALONE. I want to calculate in a range from 01 to 07 but is text not number...
- Anonymous2 years ago
Hi Luis_Caston ,
You can modify it to the following measure:
Test1_Measure = var _text= ISERROR(VALUE(MAX('Cultivo'[CodigoFinca]))) var _if= IF( _text=FALSE(),MAX([CodigoFinca]),BLANK()) return VALUE(_if)Test2_Measure = SUMX( FILTER(ALL('Cultivo'), [Test1_Measure]<=8&&[Test1_Measure]<>BLANK()),[Hectáreas Final])Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi Luis_Caston ,
You can modify it to the following measure:
Test1_Measure =
var _text=
ISERROR(VALUE(MAX('Cultivo'[CodigoFinca])))
var _if=
IF(
_text=FALSE(),MAX([CodigoFinca]),BLANK())
return
VALUE(_if)Test2_Measure =
SUMX(
FILTER(ALL('Cultivo'),
[Test1_Measure]<=8&&[Test1_Measure]<>BLANK()),[Hectáreas Final])
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Luis_Caston2 years agoHelper III
Thank you Anonymous!!
Pretty amazing!
I've adapted the formula following your criteria and works perfectly.
"[HA codigo finca]" is yours "Test1_Meausre]".SUMX(VALUES(Cultivo), CALCULATE( [Hectáreas Final], USERELATIONSHIP(CabeceraCampo[FechaPlantacion], Calendario[Fecha]), FILTER(ALL(Calendario), Calendario[Fecha] <= MAX(Calendario[Fecha])),FILTER(ALL(Cultivo[CodigoFinca]), [HA Codigo finca]<=7&&[HA Codigo finca]<>BLANK())))
Thank you so much, universal and pretty simple.