Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedBe 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?
User | Count |
---|---|
119 | |
78 | |
58 | |
52 | |
46 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |