Forum Discussion
FP68
6 months agoHelper I
Regular expression
Hi, I want to search the chain "Name" in a columns which contains among others "ApplicationName" ? example: Countries=xx; ApplicationId=nbk;Name=yvalxx; ApplicationName=sauve/netbackup; Envir...
- 6 months ago
Hi FP68
ApplicationName2 =VAR TagText = Disques_Global[TAGS]VAR _Key = "Name="VAR _Key2 = "ApplicationName="VAR KeyPos = SEARCH ( _Key, TagText, 1, 0 )VAR Key2Pos = SEARCH ( _Key2, TagText, 1, 0 )VAR ValueStart = KeyPos + LEN ( _Key )VAR SemiPos = SEARCH ( ";", TagText, ValueStart, 0 )RETURNIF (KeyPos = 0,BLANK(),IF (KeyPos <> Key2Pos + 11,IF (SemiPos = 0,MID ( TagText, ValueStart, LEN ( TagText ) - ValueStart + 1 ),MID ( TagText, ValueStart, SemiPos - ValueStart ))))If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadWant to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
FreemanZ
6 months agoSuper User
how about using ";Name="?
- FP686 months agoHelper I
Hi,
The colums can start with Name so ";Name" is not OK- FBergamaschi6 months agoSuper User
Hi FP68
ApplicationName2 =VAR TagText = Disques_Global[TAGS]VAR _Key = "Name="VAR _Key2 = "ApplicationName="VAR KeyPos = SEARCH ( _Key, TagText, 1, 0 )VAR Key2Pos = SEARCH ( _Key2, TagText, 1, 0 )VAR ValueStart = KeyPos + LEN ( _Key )VAR SemiPos = SEARCH ( ";", TagText, ValueStart, 0 )RETURNIF (KeyPos = 0,BLANK(),IF (KeyPos <> Key2Pos + 11,IF (SemiPos = 0,MID ( TagText, ValueStart, LEN ( TagText ) - ValueStart + 1 ),MID ( TagText, ValueStart, SemiPos - ValueStart ))))If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadWant to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- FP686 months agoHelper I
As usual, thanks a lot FBergamaschi
Regards