[{"id":"26713f3d-fbf1-4c9c-bdbe-31fb188e7096","tags":[{"name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601","links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e"}]},{"id":"d9f783e1-612a-4fa7-9408-7f1c821a45fc","tags":[{"name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601","links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e"}]},{"id":"af5bd81a-b6cd-410b-84b4-9de9c51c3a7d","tags":[{"name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601","links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e"}]},{"id":"60de5e12-02d9-4fd1-8db5-cb82a6bca160","tags":[{"name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601","links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e"}]},{"id":"6af12f79-8609-4b30-8be3-d617d0cd7a16","tags":[{"name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601","links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e"}]},{"id":"86b2a642-0ee8-4605-b04d-e7e0ec019e01","tags":[{"name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601","links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e"}]},{"id":"aa9c6845-a521-49a8-ba61-f85856865f32","tags":[{"name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601","links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e"}]}]
        
(Showing Draft Content)

Miscellaneous Functions

Lookup

Returns the first matching value of the specified field from the specified dataset.


Syntax


Lookup(source, destination, result, dataset)


Arguments

  • source - an expression that evaluates in the current scope and specifies the key to look up.

  • destination - an expression that evaluates for each row in a dataset and specifies the key to match on.

  • result - an expression that evaluates for the row in the dataset where source = destination and specifies the value to return.

  • dataset - a string that indicates a dataset's name in the report.

Examples


The Get Started with Tabular Reports demo uses the following expression to display the category name from the Categories dataset within the table bound to the Products dataset.

{Lookup(categoryId, categoryId, categoryName, "Categories")}

LookupSet

Returns all the matchings value of the specified field from the specified dataset.


Syntax


LookupSet(source, destination, result, dataset)


Arguments

  • source - an expression that evaluates in the current scope and specifies the key to look up.

  • destination - an expression that evaluates for each row in a dataset and specifies the key to match on.

  • result - an expression that evaluates for the row in the dataset where source = destinationand specifies the value to return.

  • dataset - a string that indicates a dataset's name in the report.

Examples


You can use the following expression to find all the stores with the current scope's TerritoryID value.

{LookupSet(TerritoryID, TerritoryID, StoreName, "Stores")}

Previous

Returns the value of the specified expression in the previous instance of an item within the specified scope.


Syntax


Previous(expression, [scope])


Arguments

  • expression - the expression on which to calculate the summary value

  • scope - the optional calculation scope

Examples


You can use the following expression to return the previous value of the SalesCount field in the current scope.

{Previous(SalesCount)}

RowNumber

Returns a running count of the number of rows for the specified scope.


Syntax


RowNumber([scope])


Arguments

  • scope - the optional calculation scope

Join

Returns a string created by joining substrings contained in an array.


Syntax


Join(sourcearray, [ delimiter ])


Arguments

  • sourcearray - an array containing substrings to be joined.

  • delimiter - an optional character used to separate the substrings in the returned string. If omitted, the space character (" ") is used.

Examples


You can use the following expression to display the products list from the category with the current CategoryID value.

{Join(LookupSet(CategoryId, CategoryId, ProductName, "Products"), ",")}

Partition

Returns a string indicating where a number occurs within a calculated series of ranges.


Syntax


Partition(number, start, stop, interval)


Arguments

  • number - the number that you want to evaluate against the ranges.

  • start - the number that is the start of the overall range of numbers. The number can't be less than 0.

  • stop - the number that is the end of the overall range of numbers. The number can't be equal to or less than start.

  • interval - the number that is the difference between one range and the next. The number can't be less than 1.

Examples


You can use the following expression to display the range where the current value of the Freight field falls into

{Partition(Freight, 0, 500, 50)}

Level

Returns the current level of depth in a recursive hierarchy


Syntax


Level([scope])


Arguments

  • scope - the optional calculation scope.

Examples


The Interactive Hierarchy demo uses the following expression for the left padding of a textbox that displays the Store Name.

{CStr(Level() * 12 + 12)}pt