-
1. Re: Need Help in IF Condition using STARTSWITH
John Sobczak Jun 7, 2016 5:44 AM (in response to Vijay Kumar)Maybe IF STARTSWITH (IP ADDRESS,"10.10") and NOT STARTSWITH (IP ADDRESS, "10.100." THEN DENVER
-
2. Re: Need Help in IF Condition using STARTSWITH
Vijay Kumar Jun 7, 2016 5:53 AM (in response to John Sobczak)Hi John please see my IP addresses below.
IP Address
10.100.xx.xx - Denver
10.100.1.xx - China
10.100.2 .xx- Chicago
I have the above scenario which has 10.100.xxx IPs come under Denver but 10.100.1.xx and 10.100.2.xx alone ranges come under 2 different cities
-
3. Re: Need Help in IF Condition using STARTSWITH
Vijay Kumar Jun 7, 2016 8:50 AM (in response to Vijay Kumar)Friends I am attaching a sample workbook for this scenario.
I have tried a calculated condition named as Location.
Please check and help
-
Sample Workbook.twbx 11.3 KB
-
-
4. Re: Need Help in IF Condition using STARTSWITH
Jeff D Jun 7, 2016 8:17 PM (in response to Vijay Kumar)Hi Vijay, a simple solution is to place the Denver test last:
IF STARTSWITH([IP], "10.100.1.") THEN "CHINA" ELSEIF STARTSWITH([IP], "10.100.2.") THEN "CHICAGO" ELSEIF STARTSWITH([IP], "10.100.") THEN "DENVER" END
-
5. Re: Need Help in IF Condition using STARTSWITH
Vijay Kumar Jun 7, 2016 8:26 PM (in response to Jeff D)Hi John this is not a single situation because like Denver I have scenarios
for multiple locations out of 100 cities in my DB.
-
6. Re: Need Help in IF Condition using STARTSWITH
Ashish Chaudhari Jun 7, 2016 11:15 PM (in response to Vijay Kumar)can you share the IP address and country name sample data for 100-150 rows. I think rather than startswith we should give a try to regular expressions. I can give it a shot if you can provide me mentioned data.
-
7. Re: Need Help in IF Condition using STARTSWITH
Vijay Kumar Jun 13, 2016 12:07 AM (in response to Ashish Chaudhari)Hi Friends,
Got any solution? It's not that I am looking for a formula only with that
starts with and if.. pls suggest me a best solution
On 08-Jun-2016 11:46 am, "Ashish Chaudhari" <tableaucommunity@tableau.com>