Forum Discussion
Anonymous
5 years agoNot applicable
String categorizing, a little challenge, Please help! Thanks!
Looking for hero’s and experts’ help on string process. Generally speak, there are URLs need to be classified into different level & category. But the URLs structure & value are so much varies…. Th...
Anonymous
5 years agoNot applicable
Hi Anonymous
I would prefer M to do it, text munipulation is more intuitive...did not write all the conditions in DAX, just point a direction, the video is not correctly returned now
Product in URL = IF(SEARCH("/products/",[URL],,-1)=-1,"No","Yes")
Content ID =
VAR BH = SEARCH("/bh",[URL],,-1)
VAR DL = SEARCH("/dl",[URL],,-1)
VAR VID = SEARCH("/vid",[URL],,-1)
RETURN
SWITCH(TRUE(),
BH >-1, MID([URL],BH+1,8),
DL >-1, MID([URL],DL+1,8),
VID >-1, MID([URL],VID+1,9),
"TEST")
if you go with M, you can split URL to a list, then match and extract the value accordingly
- Anonymous5 years agoNot applicable
Anonymous, I am very new to Power BI, it's the first time I know M, learning on it.
Thanks for reply.