March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I'm trying to make a simple dashboard to review our logs and was hoping I could create custom column that grabs IP addresses from the description but I am having a rough time when there is no IP or if its not in between two lines.
Is there a way for powerbi to look for #.#.#.# which is typically an IP address and display it in a column and not show anything if there isn't an IP #.#.#.# in the description?
Solved! Go to Solution.
Hi @bashheadonwall ,
Use the following dax to create a new column:
Column =
VAR test1 =
MID ( 'Table'[Description], SEARCH ( ":", 'Table'[Description],, 0 ) + 1, 1 )
VAR test2 =
SEARCH (
",",
'Table'[Description],
SEARCH ( ":", 'Table'[Description],, 0 ) + 1,
0
)
VAR test3 =
IF (
test1 = "1"
|| test1 = "2"
|| test1 = "3"
|| test1 = "4"
|| test1 = "5"
|| test1 = "6"
|| test1 = "7"
|| test1 = "8"
|| test1 = "9"
|| test1 = "0",
MID (
'Table'[Description],
SEARCH ( ":", 'Table'[Description],, 0 ) + 1,
test2
- ( SEARCH ( ":", 'Table'[Description],, 0 ) + 1 )
)
)
RETURN
test3
return:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @bashheadonwall ,
Use the following dax to create a new column:
Column =
VAR test1 =
MID ( 'Table'[Description], SEARCH ( ":", 'Table'[Description],, 0 ) + 1, 1 )
VAR test2 =
SEARCH (
",",
'Table'[Description],
SEARCH ( ":", 'Table'[Description],, 0 ) + 1,
0
)
VAR test3 =
IF (
test1 = "1"
|| test1 = "2"
|| test1 = "3"
|| test1 = "4"
|| test1 = "5"
|| test1 = "6"
|| test1 = "7"
|| test1 = "8"
|| test1 = "9"
|| test1 = "0",
MID (
'Table'[Description],
SEARCH ( ":", 'Table'[Description],, 0 ) + 1,
test2
- ( SEARCH ( ":", 'Table'[Description],, 0 ) + 1 )
)
)
RETURN
test3
return:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi,
Have you tried using the Column from Examples feature of the Query Editor?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |