The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have a column like below.
I want to return rows which contain let's say VVS150.
How to do this?
Solved! Go to Solution.
TEST=
var VVS = SEARCH("VVS"; Warehouse[Item Name]; 1; BLANK())
RETURN
IF(ISBLANK(VVR); "Undefined"; MID(Warehouse[Item Name]; VVS+4; 3))
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)
@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?
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))
@az38
Your first solution return same error.
But I can't understand your second idea.
What VVR and "Undefined" in your statement mean?
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
@az38
Now error dissappear 😉
Moving to the next.
I want to return respectively 180,100,075,075,021,040 -> How to modify my function?
ok
TEST=
var VVS = SEARCH("VVS"; Warehouse[Item Name]; 1; BLANK())
RETURN
IF(ISBLANK(VVR); "Undefined"; MID(Warehouse[Item Name]; VVS+3; 3))
TEST=
var VVS = SEARCH("VVS"; Warehouse[Item Name]; 1; BLANK())
RETURN
IF(ISBLANK(VVR); "Undefined"; MID(Warehouse[Item Name]; VVS+4; 3))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
75 | |
52 | |
50 |
User | Count |
---|---|
133 | |
124 | |
78 | |
64 | |
61 |