Forum Discussion

Luis_Caston's avatar
Luis_Caston
Helper III
2 years ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    2 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.