Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
scotthan
Partner - Contributor III
Partner - Contributor III

a simple question: count(total <field> distinct value)?

What does this quasi-set analysis syntax mean?  I am familiar with normal set analysis with the dollar sign and curly brackets and understand what the words total and distinct would mean in the expression, but what is the significance of the <field> in that expression?  Thanks.

1 Solution

Accepted Solutions
Not applicable

<field> is a syntax used with the total keyword. Ususally, total means that the aggregation is done over all values regardless of dimension. However, it is possible to make it take some dimensions into consideration. So if u have dimensions year and region the expression: count(total <region> sales) will count the total number of sales for each region, regardless of year. Count(total <year> sales) will count the total number of sales for eac year, regardless of region.

Hope it helps!

/Regards

View solution in original post

1 Reply
Not applicable

<field> is a syntax used with the total keyword. Ususally, total means that the aggregation is done over all values regardless of dimension. However, it is possible to make it take some dimensions into consideration. So if u have dimensions year and region the expression: count(total <region> sales) will count the total number of sales for each region, regardless of year. Count(total <year> sales) will count the total number of sales for eac year, regardless of region.

Hope it helps!

/Regards