Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Filter code by 2 conditions

Nice day I need to filter the clients in Transforar Data whose code begins with the letter B and also those whose code is more than 5 characters long. This company has very different codes for its c...
  • PaulDBrown's avatar
    PaulDBrown
    4 years ago

    Try:

    BAG QUANTITY =
    CALCULATE (
        SUM ( GVA53[QUANTITY] ),
        FILTER (
            GVA53,
            LEFT ( GVA53[GVV12. COD_CLIENT], 1 ) = "B"
                || LEN ( GVA53[GVV12. COD_CLIENT] >= 5 )
        )
    )