Forum Discussion

pawelj795's avatar
pawelj795
Post Prodigy
6 years ago
Solved

Row contains specified value

Hi,
I have a column like below.



I want to return rows which contain let's say VVS150.

How to do this?

  • az38's avatar
    az38
    6 years ago

    pawelj795  🙂

    TEST= 
    var VVS = SEARCH("VVS"; Warehouse[Item Name]; 1; BLANK())
    
    RETURN
    IF(ISBLANK(VVR); "Undefined"; MID(Warehouse[Item Name]; VVS+4; 3))

10 Replies

  • az38's avatar
    az38
    Community Champion

    Hi pawelj795 

    for example you can create a calculated column

    _isContain = IF(SEARCH("VVS150", [Column]) > 0, TRUE(), FALSE())

    then filter in visual by this new column

    or

    to create a new calculated table

    _newTable = FILTER(Table, SEARCH("VVS150", Table[Column]) > 0)
    • pawelj795's avatar
      pawelj795
      Post Prodigy

      az38 
      It's a only a bit of much complicated function, so it must end in one formula.

       

      I ask differently.


      From above screenshot I want to RETURN three digits.

      Where is my mistake?

      • az38's avatar
        az38
        Community Champion

        pawelj795 

        try to replace BlANK() to 0 in your var statement - MID should have a digit second argument, BlANK() will provide an expected error

        or try to obtain MID in if like

        IF(ISBLANK(VVR); "Undefined"; MID(Warehouse[Item Name];VVS;3))