How to convert URL-contains Excel formula to Power BI calculated column?
up vote
0
down vote
favorite
I use this Excel formula to tell if the URL in the A column contains the '/amp/' string:
= IF(OR(SUMPRODUCT(--((ISERR(SEARCH({"/amp/"},a2)))))>0),FALSE,TRUE)))))))))))))
How would I do that in a calculated column/measure in Power BI?
excel excel-formula powerbi powerbi-desktop
add a comment |
up vote
0
down vote
favorite
I use this Excel formula to tell if the URL in the A column contains the '/amp/' string:
= IF(OR(SUMPRODUCT(--((ISERR(SEARCH({"/amp/"},a2)))))>0),FALSE,TRUE)))))))))))))
How would I do that in a calculated column/measure in Power BI?
excel excel-formula powerbi powerbi-desktop
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I use this Excel formula to tell if the URL in the A column contains the '/amp/' string:
= IF(OR(SUMPRODUCT(--((ISERR(SEARCH({"/amp/"},a2)))))>0),FALSE,TRUE)))))))))))))
How would I do that in a calculated column/measure in Power BI?
excel excel-formula powerbi powerbi-desktop
I use this Excel formula to tell if the URL in the A column contains the '/amp/' string:
= IF(OR(SUMPRODUCT(--((ISERR(SEARCH({"/amp/"},a2)))))>0),FALSE,TRUE)))))))))))))
How would I do that in a calculated column/measure in Power BI?
excel excel-formula powerbi powerbi-desktop
excel excel-formula powerbi powerbi-desktop
asked Nov 17 at 15:06
simpatico
4,5031564110
4,5031564110
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
You can use FIND function to search for the /amp/
in the column where the URL is stored. You can define the value to be returned, if the pattern is not found, but not the value in case it is. So you can use IF to be able to freely define "contains" and "do not contains" values.
=IF(FIND("/amp/", 'TableName'[ColumnWithURL], -1) = -1, <value_if_true>, <value_if_false>)
IsAMP = IF(FIND("/amp/", ABC[Landing Page], 1, -1) = -1, false, true)
– simpatico
Nov 17 at 16:46
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You can use FIND function to search for the /amp/
in the column where the URL is stored. You can define the value to be returned, if the pattern is not found, but not the value in case it is. So you can use IF to be able to freely define "contains" and "do not contains" values.
=IF(FIND("/amp/", 'TableName'[ColumnWithURL], -1) = -1, <value_if_true>, <value_if_false>)
IsAMP = IF(FIND("/amp/", ABC[Landing Page], 1, -1) = -1, false, true)
– simpatico
Nov 17 at 16:46
add a comment |
up vote
0
down vote
accepted
You can use FIND function to search for the /amp/
in the column where the URL is stored. You can define the value to be returned, if the pattern is not found, but not the value in case it is. So you can use IF to be able to freely define "contains" and "do not contains" values.
=IF(FIND("/amp/", 'TableName'[ColumnWithURL], -1) = -1, <value_if_true>, <value_if_false>)
IsAMP = IF(FIND("/amp/", ABC[Landing Page], 1, -1) = -1, false, true)
– simpatico
Nov 17 at 16:46
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You can use FIND function to search for the /amp/
in the column where the URL is stored. You can define the value to be returned, if the pattern is not found, but not the value in case it is. So you can use IF to be able to freely define "contains" and "do not contains" values.
=IF(FIND("/amp/", 'TableName'[ColumnWithURL], -1) = -1, <value_if_true>, <value_if_false>)
You can use FIND function to search for the /amp/
in the column where the URL is stored. You can define the value to be returned, if the pattern is not found, but not the value in case it is. So you can use IF to be able to freely define "contains" and "do not contains" values.
=IF(FIND("/amp/", 'TableName'[ColumnWithURL], -1) = -1, <value_if_true>, <value_if_false>)
answered Nov 17 at 15:49
Andrey Nikolov
1,461139
1,461139
IsAMP = IF(FIND("/amp/", ABC[Landing Page], 1, -1) = -1, false, true)
– simpatico
Nov 17 at 16:46
add a comment |
IsAMP = IF(FIND("/amp/", ABC[Landing Page], 1, -1) = -1, false, true)
– simpatico
Nov 17 at 16:46
IsAMP = IF(FIND("/amp/", ABC[Landing Page], 1, -1) = -1, false, true)
– simpatico
Nov 17 at 16:46
IsAMP = IF(FIND("/amp/", ABC[Landing Page], 1, -1) = -1, false, true)
– simpatico
Nov 17 at 16:46
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53352460%2fhow-to-convert-url-contains-excel-formula-to-power-bi-calculated-column%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown