I'm new with email marketing and I would really appreciate if someone could help me to show what i'm missing in conditional
merge tag blocks. I've made numerous attempts in building the template with |IF:| |END:IF| formula, based on the specific fields in my contacts lists, but nothing worked.
My colleague who is on the same knowledge level insists that this option is available for paid users which I'm not and says that I need to choose a paid plan in order to
proceed with this. Is this correct? Or I just need to have a better look at the formula?
I would say its more about you looking at your logic. Here is the URL from MC's site showing what you can do with their conditional statements:
IF
*|IF:MERGE|*
content to display
*|END:IF|*
ELSE
*|IF:MERGE|*
content to display
*|ELSE:|*
alternative content to display
*|END:IF|*
ELSEIF
*|IF:TRANSACTIONS >= 20|*
Enjoy this 40% off coupon! *|COUPON40|*
*|ELSEIF:TRANSACTIONS >= 10|*
Enjoy this 20% off coupon! *|COUPON20|*
*|ELSE:|*
Enjoy this 10% off coupon! *|COUPON10|*
*|END:IF|*
IFNOT
*|IFNOT:MERGE|*
content to display
*|
Full list of conditional statements can be found here: MailChimp Conditional Formating
Cheers
Thanks to #William Entriken for pointing out the ELSEIF tags no longer work.
Here's an implementation with nested ifs. The following assumes a week starts with Monday as DAY_ID = 1 and ends with Sunday = 7
*|IF:DAY_ID < 2|*
Monday
*|ELSE:|*
*|IF:DAY_ID < 3|*
Tuesday
*|ELSE:|*
*|IF:DAY_ID < 4|*
Wednesday
*|ELSE:|*
*|IF:DAY_ID < 5|*
Thursday
*|ELSE:|*
*|IF:DAY_ID < 6|*
Friday
*|ELSE:|*
Weekend
*|END:IF|*
*|END:IF|*
*|END:IF|*
*|END:IF|*
*|END:IF|*
Related
I just started working with Bigquery. Data comes from firebase and I noticed that I got the data each day, for example gara-e78a5.analytics_247657392.events_20221231, gara-e78a5.analytics_247657392.events_20221230 etc....
Each row comes with an event_date like under this format 20221231
I want to count the number of people landing on our page each week, but I don't know I to group them by week.
I started something like this but I don't know to group it by week:
SELECT count(event_name) FROM app-xxxx.analytics_247657392.events_* where event_name = 'page_download_view' group by
Thanks in advance for your help
Based on #Ronak, i found the solution.
SELECT week_of_year, sum(nb_download) as nb_download_per_week from (
SELECT DISTINCT EXTRACT (WEEK from (PARSE_DATE('%Y%m%d', event_date))) as week_of_year, count(event_name) as nb_download from `tabllle-e78a5.analytics_XXXXX.events_*` where event_name = 'landing_event_download_apk' group by event_date) group by week_of_year
You can use the WEEK (or ISOWEEK) function.
WEEK: Returns the week number of the date in the range [0, 53]
More: https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions
Formats - https://cloud.google.com/bigquery/docs/reference/standard-sql/timestamp_functions#format_timestamp
This should work
select EXTRACT(ISOWEEK FROM(CAST(PARSE_DATE('%Y%m%d', <column>) as TIMESTAMP))) as week_of_year from <table>
Output
I have a simple if Statement in Power Query I feel I need a separate set of eyes on.
I am trying to say if the current day of the week is Monday then I want the system to display whatever the date was 3 days ago, else any other day just show yesterdays date. My formula below is receiving the error "Token RightParen expected." at the "Date" after "then" on the 2nd line.
if(Date.DayOfWeek(DateTime.FixedLocalNow()) = 0 then
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-3) else
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-1))
A few extra characters. Remove first and last parenthesis
let Source = if
Date.DayOfWeek(DateTime.FixedLocalNow()) = 0 then
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-3) else
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-1)
in Source
I am doing a personal budgeting project. I have 2 excel files - 1 is detail of my last 5 years banking activity, the other is an annual monthly summary and analysis (S/A) file - so 12 worksheets inside the one workbook.
I am trying to find a way to make the S/A file more dynamic so I can copy 1 formula to the various fields that look up and sum detail activity equal to or after the first date but before the 2nd date BUT ONLY for lines that match the category found in Column B of the S/A file worksheet. This gives me the activity in my budget categories between 1 paydate and the day before the next paydate.
Example: I want to find and sum all the amounts (Detail file $F:$F) in my detail file that are for Cell Phone payments (Detail File $E:$E, matching S/A field B6) where the transaction date (Detail file $A:$A) is on or after 7/14/2017 (start Date, S/A field E5) but before 7/28/2017 (end date, S/A field E33).
This is what I have tried:
=IF(AND('[2016-Present Bank Statements.xlsx]Checking TRX'!$A$2:$A$2959>(E5-1),'[2016-Present Bank Statements.xlsx]Checking TRX'!$A$2:$A$2959<E33),SUMIF('[2016-Present Bank Statements.xlsx]Checking TRX'!$E$2:$E$2959,B6,'[2016-Present Bank Statements.xlsx]Checking TRX'!$F$1:$F$2959),0)
I was getting an error trying to put ">=" into the first component so I put the cell reference -1 to get the previous date from my starting date. So anything greater than E5-1 should include the date in E5 (because let's face it, we all go mad spending on payday).
=SUMIFS('[2016-Present Bank Statements.xlsx]Checking TRX'!$F:$F,'[2016-Present Bank Statements.xlsx]Checking TRX'!$E:$E,B6,'[2016-Present Bank Statements.xlsx]Checking TRX'!$A:$A,"E5≤x<E33")
The last part "E5≤x<E33" I found on the interwebs for comparing dates.
I have tried breaking out the greater than/equal to and less than statements into 2 criteria in a SUMIFS, but no luck.
I either get back 0.00 or #SPILL
These are the headers in my details file. Do I need to rearrange them to get either of these formulas to pick up the right amount?
Date|Account|Merchant|Description|Category|Amount
My current process is to do a SUMIF but have it reference the specific lines that related to the start and end dates. I've gotten off somehow between yesterday and today and don't want to redo all my tabs so far.
=-SUMIF('[2016-Present Bank Statements.xlsx]Checking TRX'!$E$2076:$E$2168,B6,'[2016-Present Bank Statements.xlsx]Checking TRX'!$F$2076:$F$2168)
Please help!!!
Use SUMIFS. Something like:
=SUMIFS(sum_range,
type_range, type,
date_range, ">"&start_date,
date_range, "<"&stop_date)
Obviously replace ">" with ">=" if you see fit. See the simple example below.
I have a Power Bi dashboard tracking several metrics since the beginning of last month . Some of the comparisons I make are MTD vs Last MTD count of metrics like Total users, No of posts and connections made.
MTD(June) and LMTD(May) were working well last month(June) but when we moved to a new month(july) the numbers are off.
Here's my measure
MTD_Users = CALCULATE(COUNTROWS('reporting profiles'), FILTER('reporting profile', MONTH('reporting profile'[date_created])=MONTH(TODAY())))
LMTD_USERS = CALCULATE(COUNTROWS('reporting profiles'), FILTER('reporting profile', MONTH('reporting profile'[date_created])=MONTH(TODAY())-1))
Since July 2nd these measures are not displaying correct figures for MTD(July 1st) and LMTD(June 1st)
Any advice/assistance will be highly appreciated
You need to ride off contex filter and that mean we must use function ALL or REMOVEFILTERS;
https://dax.guide/removefilters/
https://dax.guide/all/
LMTD_USERS = CALCULATE(COUNTROWS('reporting profiles'), FILTER(ALL('reporting profile'[date_created])), MONTH('reporting profile'[date_created])=MONTH(TODAY())-1))
We have users replying on an e-mail and we need to retrieve the date mentioned in the table.
For the moment I made the following code to do that for us:
$temp = ($Mail.Body.Text -creplace '(?m)^\s*\r?\n' -split "User name`r`n`tLogon name`r`n`tEnd date`r`n`tNew end date")[1]
(($temp -split "`r`n`t")[3] -split "`r`n")[0]
As you can see, it's quite long and very much relying on -split. Is there an easier way to retrieve the date? With Select-String or a Regex or something?
The table format in the e-mail is always the same, as the users needs to fill in the date in the HTML table. So we need to be able to read that table. In the example below the result would be 01/08/2016.
Example of such an e-mail:
Date added below
From: GBR Service Desk
Sent: Wendesday 29 juni 2016 7:00
To: Bond, James (London) GBR
Subject: REMINDER Expiring user:
Importance: High
Dear James
This is a reminder e-mail to inform you that the following Windows user account will expire soon:
User name
Logon name
End date
New end date
Smith, Jobn (Manchester) GBR
jent
01/07/2016
01/08/2016
Because you are registered as the manager of this user, we would like to ask you to verify if this account is still nee
ded after its end date. More text...
Yours sincerely
Thank you for your help.
You could use Select-String to find date-like patterns and select the last one:
$EndDate = ($Mail.Body.Text |Select-String '\d{2}/\d{2}/\d{4}' -AllMatches).Matches[-1].Value