cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Row contains specified value

Hi,
I have a column like below.

image.png

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

How to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Row contains specified value

@pawelj795  🙂

TEST= 
var VVS = SEARCH("VVS"; Warehouse[Item Name]; 1; BLANK())

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

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

10 REPLIES 10
Highlighted
Super User II
Super User II

Re: Row contains specified value

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)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Highlighted
Post Patron
Post Patron

Re: Row contains specified value

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

 

I ask differently.

image.png


From above screenshot I want to RETURN three digits.

Where is my mistake?
image.png

Highlighted
Super User II
Super User II

Re: Row contains specified value

@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))

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Highlighted
Post Patron
Post Patron

Re: Row contains specified value

@az38 
Your first solution return same error.

But I can't understand your second idea.

What VVR and "Undefined" in your statement mean?

Highlighted
Super User II
Super User II

Re: Row contains specified value

@pawelj795 

it will check - if VVR returns BLANK() value then column wll be equal "Undefined" or anything you want instead. If VVR returns digit it will execute MID() function


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Highlighted
Post Patron
Post Patron

Re: Row contains specified value

@az38 
Now error dissappear 😉

Moving to the next.

image.png
image.pngimage.png

I want to return respectively 180,100,075,075,021,040 -> How to modify my function?

Highlighted
Super User II
Super User II

Re: Row contains specified value

ok

@pawelj795 

TEST= 
var VVS = SEARCH("VVS"; Warehouse[Item Name]; 1; BLANK())

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

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Highlighted
Post Patron
Post Patron

Re: Row contains specified value

@az38 image.png

Unfortunately, it's not working

Highlighted
Super User II
Super User II

Re: Row contains specified value

@pawelj795  🙂

TEST= 
var VVS = SEARCH("VVS"; Warehouse[Item Name]; 1; BLANK())

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

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors