Skip to content

Instantly share code, notes, and snippets.

@markwoodroof
markwoodroof / crlf
Last active June 13, 2022 09:04
End of line & Carriage Return #data #cr #lf
End of Line characters for search and replace
LF character : \n
CR character : \r
Show in Notepad++
View > Show Symbols > All Characters
@markwoodroof
markwoodroof / FetchFilter_ActiveAccountsContacts
Last active June 6, 2022 15:57
Fetch Filter - Active Accounts or Contacts #FetchXML
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
</filter>
@markwoodroof
markwoodroof / Accounts_Contacts_Leads_Master_Data_Model__Contacts&Account
Created May 31, 2022 08:53
Accounts_Contacts_Leads_Master_Data_Model > Output Selected Columns from Contacts with related Account Data #dax
EVALUATE
SELECTCOLUMNS(
// define table with condition
CALCULATETABLE(contacts,
contacts[a2c_zoominfocontactid] <> ""
),
// columns to pull in
"a2c_zoominfocontactid" , contacts[a2c_zoominfocontactid],
"contactid" , contacts[contactid],
@markwoodroof
markwoodroof / Accounts_Contacts_Leads_Master_Data_Model__Contacts
Created May 31, 2022 08:51
Accounts_Contacts_Leads_Master_Data_Model > Output Selected Columns from Contacts #dax
EVALUATE
SELECTCOLUMNS(
// define table with condition
CALCULATETABLE(contacts,
contacts[a2c_zoominfocontactid] <> ""
),
// columns to pull in
"contactid" , contacts[contactid],
"email" , contacts[emailaddress1],
@markwoodroof
markwoodroof / dax_evaluate_with_related_table
Created May 25, 2022 09:50
Evaluate columns and add a column from a related table #dax #excel
@markwoodroof
markwoodroof / dax_evaluate_selectcolumns
Last active May 25, 2022 09:49
Evaluate table and select specific columns #dax #excel
EVALUATE
SELECTCOLUMNS(
// define table with condition
CALCULATETABLE(accounts,
accounts[accountid] <> ""
),
// columns to pull in
"a2c_zoominfoaccountid" , accounts[a2c_zoominfoaccountid],
"accountid" , accounts[accountid],
@markwoodroof
markwoodroof / dax_evaluate.txt
Last active May 17, 2022 08:27
Evaluate and get data from a table #dax
EVALUATE
CALCULATETABLE(<target_table>,<condition1, condition2, condition3)
Note
Conditions can use related tables - eg RelatedTableName[ZoomInfo Company ID] <> ""
Example
EVALUATE
CALCULATETABLE(account,accounts[accountid] <> "")
@markwoodroof
markwoodroof / dax_earlier_count.txt
Created May 16, 2022 09:59
Count earlier occurences #dax
=IF(accounts[name] = "",0,COUNTROWS ( FILTER (accounts, accounts[name] = EARLIER (accounts[name] ))))
{
"data": [
{
"departmentId": 2682032,
"departmentName": "HR",
"isEnabled": "Y",
"cc": "rgb(19,164,138)",
"deptHeadObjId": 8,
"deptHeadObjRefId": 2115966,
"deptHeadName": "Scott Macmeekin",
@markwoodroof
markwoodroof / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console