3 Replies Latest reply on Dec 10, 2014 3:04 PM by Chris McClellan

# Count If wildcard

Hi,

Very new to this - and only just delving into calculations!

I have some weather data by station, which has a text field giving a forecast/summary of conditions for the day [Significant Weather (Day)]. I want to count the number of forecasts that contain the word snow (as far as I can tell there are 4 distinct variations of this from light to heavy snow), and divide this by the total number of forecasts in each region (each station produces a foreast, which is assigned to a region).

Any idea's, I've gone to the tutorial videos and no luck?

Thanks,

• ###### 1. Re: Count If wildcard

Some sample data/twbx would be great, but I'd start by creating a measure with this formula:

if find([Forecast Description], 'snow') > 0 then 1 else 0 end

1 = snow is found in [Forecast Description]

0 = no snow

• ###### 2. Re: Count If wildcard

Hi Chris,

First of all thanks for the reply; I've not managed to get it working, so I've pasted some of the data below: The column is Significant Weather (Day) which is a text field.

 Site Code Site Name Country Continent Start Time Day Date Time Step Wind Direction (Day) Wind Speed (Day) Screen Temperature (Day) Significant Weather (Day) Wind Direction (Night) Wind Speed (Night) Screen Temperature (Night) Significant Weather (Night) Relative Humidity (Day) Relative Humidity (Night) Visibility Range (Day) Visibility Description (Day) Visibility Range (Night) Visibility Description (Night) Wind Gust (Day) Wind Gust (Night) Feels Like Temperature (Day) Feels Like Temperature (Night) UV Index Precipitation Probability (Day) Precipitation Probability (Night) 3 SOUTHAMPTON AIRPORT(3) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 0 SSW 7 9 (White) Medium-level cloud WSW 21 4 Heavy Rain 84 93 < 20000 m Good < 10000 m Moderate 17 35 5 1 1 20 80 3 SOUTHAMPTON AIRPORT(3) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 24 WSW 11 8 Sunny intervals W 19 4 (White) Medium-level cloud 67 77 < 40000 m Very good < 20000 m Good 23 29 4 -1 1 20 20 3 SOUTHAMPTON AIRPORT(3) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 48 W 13 9 Light rain SW 34 6 Heavy Rain 71 90 < 40000 m Very good < 10000 m Moderate 29 56 4 2 1 20 80 3 SOUTHAMPTON AIRPORT(3) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 72 WSW 12 9 (White) Medium-level cloud W 11 0 (White) Medium-level cloud 70 86 < 40000 m Very good < 40000 m Very good 25 16 3 -4 1 20 20 3 SOUTHAMPTON AIRPORT(3) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 96 WNW 8 6 Sunny (Day) W 9 0 Partly cloudy (Night) 71 90 < 40000 m Very good < 20000 m Good 18 14 2 -3 1 5 20 5 LONDON CITY AIRPORT(5) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 0 SSW 9 8 (White) Medium-level cloud WSW 15 6 Light rain 75 89 < 20000 m Good < 10000 m Moderate 19 31 4 2 1 20 80 5 LONDON CITY AIRPORT(5) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 24 WSW 15 9 Sunny (Day) WSW 14 6 Clear sky (Night) 62 72 < 40000 m Very good < 40000 m Very good 31 30 5 1 1 5 20 5 LONDON CITY AIRPORT(5) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 48 W 17 9 Sunny (Day) SW 17 7 Light rain 67 86 < 40000 m Very good < 10000 m Moderate 34 37 5 4 1 5 80 5 LONDON CITY AIRPORT(5) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 72 WSW 16 11 (White) Medium-level cloud W 8 3 (White) Medium-level cloud 68 82 < 40000 m Very good < 40000 m Very good 33 16 5 0 1 20 20 5 LONDON CITY AIRPORT(5) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 96 WNW 10 6 Sunny (Day) WSW 7 2 Clear sky (Night) 79 86 < 40000 m Very good < 40000 m Very good 20 13 2 0 1 5 5 6 LYDD(6) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 0 SW 8 10 (White) Medium-level cloud SW 27 6 Light rain 83 94 < 20000 m Good < 10000 m Moderate 15 43 6 2 1 20 80 6 LYDD(6) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 24 WSW 19 9 Sunny (Day) W 24 6 Clear sky (Night) 66 77 < 40000 m Very good < 40000 m Very good 32 39 5 1 1 20 20 6 LYDD(6) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 48 W 22 10 Sunny intervals SW 34 8 Heavy Rain 67 88 < 40000 m Very good < 10000 m Moderate 38 56 5 4 1 5 80 6 LYDD(6) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 72 WSW 21 11 Light rain W 14 2 (White) Medium-level cloud 76 86 < 20000 m Good < 40000 m Very good 36 21 5 -3 1 60 20 6 LYDD(6) ENGLAND EUROPE 00:00 Tuesday 09/12/2014 96 WNW 13 7 Sunny (Day) W 11 0 Clear sky (Night) 74 92 < 40000 m Very good < 20000 m Good 21 18 3 -3 1 5 5
• ###### 3. Re: Count If wildcard

Does this help ? (attached)