DataExtensionRowCount()
Returns the number of rows in a data extension.
Availability
| Marketing Cloud Engagement |
✅ Yes |
| Marketing Cloud Next |
❌ No |
Syntax
1DataExtensionRowCount(dataExtensionName)
The DataExtensionRowCount() has one parameter:
dataExtensionName (string): Required. The name of the data extension to find the row count of.
Usage
This example uses a data extension called “MembershipRewardsProgramme,” which contains the data in this table.
| MemberId | FirstName | Surname | RewardsPoints | RewardsTier | Area |
|---|
| 1 | Dennis | Smithers | 92374 | 2 | Chelsea |
| 2 | Pooja | Chatterjee | 201042 | 1 | Hammersmith |
| 3 | Tomás | Santos | 69311 | 3 | Kensington |
| 4 | Sun-Hi | Kim | 23999 | 4 | Twickenham |
| 5 | Jian | Yeh | 15123 | 4 | Chelsea |
To use the function, pass it the name of the data extension.
1%%[
2 Var @deRows
3 Set @deRows = DataExtensionRowCount("MembershipRewardsProgramme")
4 Output(v(@deRows))
5]%%
The function returns the number of rows in the specified data extension, 5.