I am trying to set up specific RSS feeds to subscribers based on region selection. I am attempting to use a Conditional Merge Tag Block. What I have below will not work and I am not sure why.
What I expect to get is the tile text (eg. North American News Headlines) and the RSS feed titles depending the region of the campaign recipient. The recipient has set their region via the sign-up form i.e REGION = North America. If the recipient's region is set to North America, it displays everything correctly until the first *|IFELSE:REGION tag then it just displays the code.
*|IF:REGION = No Region|*News Headlines Offline
No headlines for you...Your region is not set.*|ELSEIF:REGION = North America|*
North American News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/north-america/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = European Union|*
European Union News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/western-europe/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = Africa|*
African News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/sub-saharan-africa/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = East Asia|*
East Asian News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/east-asia/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = South Asia|*
South Asian News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/south-asia/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = Central America / Caribbean|*
Central American/Caribbean News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/caribbean/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = Eastern Europe / Russia|*
Eastern Europe/Russia News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/eastern-central-europe/feed|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = Middle East|*
Middle East News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/middle-east-north-africa/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = Oceania|*
Oceania News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/oceania/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSEIF:REGION = South America|*
South American News Headlines
*|FEEDBLOCK:https://globalvoicesonline.org/-/world/latin-america/feed/|**|FEEDITEMS:|*
*|FEEDITEM:TITLE|**|END:FEEDITEMS|**|END:FEEDBLOCK|**|ELSE|*nil*|END:IF|*
Your region is set to *|REGION|*. Change Region >>
Make sure you're entering the conditional mergetag block in the source code view of Mailchimp's text editor. It's got a nasty habit of splicing formatting markup in the middle of mergetags, so that your conditional mergetags look perfect in preview mode but actually the code looks like this:
*|ELSE</span>IF: Region = North America|*
Which obviously won't work too well, but will look like it works in the preview of the email. Just flick to code view and make sure there's no random code in the middle of the mergetags.
Might not apply to your problem, but it has caused me an identical result to the one you describe.
Related
So if I have three users: Tom, Dick, and Harry, and they have been assigned group colors. I'd like them to be able to see everyone's data in their own group.
Name Group Email
----- ----- -----
Tom Green t#acme.com
Dick Red d#acme.com
Harry Red h#acme.com
So I create a measure
RLS_SecurityKey = CALCULATE(FIRSTNONBLANK(People[Group],People[Group]),
USERPRINCIPALNAME() = People[Email])
And when I log in as the separate users, I can see in a card visual that I'm getting the expected group.
But when I set row level security on the People table, [Group] = [RLS_SecurityKey], I only get back the one row that matches the email address and not the user that matches his Group.
It seems I'm missing something fairly apparent, but I can't see it. How can I get back all the rows relating to Group and not the email?
Yep, it was pretty straight forward.
RLS_SecurityKey = CALCULATE(FIRSTNONBLANK(People[Group],People[Group]),
FILTER(ALL('PEOPLE'),USERPRINCIPALNAME() = People[Email]))
I adjusted the filter expression and made it a proper filter over the whole table.
I am trying to do some analytics on PowerBI. I am struck at this logic, where I am trying to Identify the common items with in the group and not common items with in the group.
For Example,
Group Name Contact
GroupA Rock
GroupA Eddy
GroupA Brown
GroupB Rock
GroupB Katie
GroupC Eddy
GroupC Brown
GroupC Katie
If I select GroupA and GroupB then I want to output the Common Items as 1 and not common Items as 3.
The Common Item is Rock
The Not Common Items are Eddy, Brown & Katie.( I am looking to get this as part of my output visual as well)
How can we do this in PowerBI which works dynamically when we select multiple groups (more than 2 as well)?
I would approach this by checking if the number of groups the Contact appears in is the same as the number of groups that you have selected:
Common = IF(COUNTROWS(VALUES(Groups[Group Name])) =
COUNTROWS(CALCULATETABLE(VALUES(Groups[Group Name]),
ALLSELECTED(Groups))),
"Common", "Not Common")
Then you can use these labels inside a second measure to get the count:
Intersect = IF([Common] = "Common",
CALCULATE(DISTINCTCOUNT(Groups[Contact]),
FILTER(ALLSELECTED(Groups[Contact]), [Common] = "Common")),
CALCULATE(DISTINCTCOUNT(Groups[Contact]),
FILTER(ALLSELECTED(Groups[Contact]), [Common] = "Not Common")))
You can then set up a table or matrix using Contact and the new measure Intersect along with a slicer on Group Name.
I have a lot of small towns (<15.000 population) from Germany in my data set, so Tableau (Desktop 10.3 Pro Version) has no geographical coordinates for them.
For this reason I made a .csv file (CustomGeo.csv is attached) with the following rows: Country (Name), State/Province, City, Latitude, Longitude. Also I created a schema.ini with the following content:
[CustomGeo.csv]
ColNameHeader=True
DecimalSymbol=,
Format=Delimited(;)
Col1="Country (Name)" Text
Col2="State/Province" Text
Col3="City" Text
Col4="Latitude" Double
Col5="Longitude" Double
Now, after I imported the csv file into Tableau (Map -> Geocoding -> Import Custom Gecoding), I have more than 600 ambiguous cities and I don't understand why. There are big cities like Stuttgart and München which are tagged as ambiguous. Bigger cities in Germany can have more than one Postcode (PLZ).
The possibility to select the field State/Province under Edit Locations and State/Province does not change anything.
Here you can download the csv file and my data set with for geocoding important columns [hosted on google drive]:
Custom Geocoding csv
Data set
Be careful if you want to open the csv file with Excel. Excel could change the column format so the latitude and longitude data could be fucked up :)
I hope anyone can help me with that problem. I do not know how to continue.
I have the solution:
If you use the column names (Country (Name), State/Province, City, Latitude, Longitude) then you will extend an existing role. For bigger cities (>15000 population) Tableau has geo data. So if you extend the existing role with all cities in Germany you will have the bigger cities as well in your custom geocoding file. Because of that, the error with ambiguous cities will show up and bigger cities like München (Munich) or Stuttgart can not be displayed on the map.
Please suggest a way to add an extra Region /State in checkout which is not there in Opencart default .
You can add region for any country from admin panel also.
settings->localisation->zone
The region/states are in the oc_zone table. You can add extra entries into this table but make sure you get the right country code and put that into the record too.
The country codes are in the oc_country table.
So, for example, if you wanted to add a new Region called "The People's Republic of Cleckheaton" to the United Kingdom, first look up the country code for the United Kingdom in oc_country. The code is 222.
Then you can add the new zone to oc_zone with something like the following:
INSERT INTO `oc_zone` (`zone_id`, `country_id`, `name`, `code`, `status`) VALUES (NULL, '222', 'The Peoples Republic of Cleckheaton', 'PRC', '1');
Finally there's another slight issue. Opencart actually caches all the country and zone data so if you add a new field like this it probably won't show up because the old data will be cached.
You should probably be able to fix this by clearing your browser's cache but failing that update the following line in \catalog\model\localisation\zone.php Warning: This is in opencart 1.5.6 but should be similar in 2.0
$zone_data = $this->cache->get('zone.' . (int)$country_id);
to
zone_data = false;
Once you've confirmed it's working ok update that line back to it's original content.
I'm using CFCHART to generate awesome charts on the fly.
It would be nice to dynamically change the title of the chart based on selection criteria.... and I've been attempting to do that by setting a string, graphTitle, that conditionally populates based on selections. All I want to do is simply start a new line for each criterion.
For instance: Suppose I have a chart that has a large number of selection criteria in it. I would want the chart title to look like this: (Break, of course, indicates the end of a line)
Fiscal Year 2006 to projected 2013 (Break)
Hires of African American Heritage candidates (Break)
Whom are Female
From New Mexico, California, Texas and Colorado (Break)
With an Age of 29+ (Break)
With a breakdown of Degree Achievement:
I tried using the <SPAN> and <BR /> tags in the title. With no luck.
Any other ideas?
If you mean you want to add line breaks into the chart title so it "wraps" you might try adding ascii coded line breaks like so...
<Csfet linefeed = chr(10) & chr(13)/>
Then your variable would be
<cfset mytitle = "fiscal year 2006 to projected 2012 #linefeed# Hires of..."/>
And so on - you get the idea. Note: you might need "just" chr(10) or you might need both. you'll need to experiment. I don't "know" that this will work. If it were me and I wanted something that complex to decorate the chart I think I would draw a plain "undecorated" chart with only x and y axis labels present and then set up my title outside the chart using HTML. I would have better control that way.
Anyway if that doesn't work try fiddling with the "style" attribute. You can provide an XML () var with all sorts of options - but it is not well documented I'm afraid. Ray has some stuff on his blog regarding this.