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.

MemberIdFirstNameSurnameRewardsPointsRewardsTierArea
1DennisSmithers923742Chelsea
2PoojaChatterjee2010421Hammersmith
3TomásSantos693113Kensington
4Sun-HiKim239994Twickenham
5JianYeh151234Chelsea

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.