Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Carlos
If you have only two years ( and you will never have more than this), you can write two expression. One for each year:
count({$<Año = {$(=max({1}Año)) } >} distinct [CODIGO MACRO])
count({$<Año = {$(=min({1}Año)) } >} distinct [CODIGO MACRO])
Or, you can use a pivot table instead of a straight table and use the following expression:
count({$<Año = >} distinct [CODIGO MACRO])
Then, you add Año as a dimension of the pivot table and move this dimension to be a horizontal line at the top of the expression.
Hope this helps,
Erich
Hi,
Try this
count({1<Año = {$(=max(Año)) } >} distinct [CODIGO MACRO])
Hi,
Try this
=count({<Año = >} distinct [CODIGO MACRO])
Año = in set analysis, ignores the field selection.
Regards,
Jagan.
use below code
count({1<Año = {$(=max(Año)) },Año = } >} distinct [CODIGO MACRO])
in this expression
{Año = } is used to ingnore selection
hope this help
Thank you guys but none of those did what I want. I am going to be more specific. I have a list box showing two years 2010 and 2011 and a Straight table which is supposed to show the count of items in two columns, one for 2010 and other for 2011 and I would like to show that count of items regardless the selection on the year's list box ocurs. 2010 column should always show the count of items for that year, the same but for 2011 too in another column.
Hi, Carlos
If you have only two years ( and you will never have more than this), you can write two expression. One for each year:
count({$<Año = {$(=max({1}Año)) } >} distinct [CODIGO MACRO])
count({$<Año = {$(=min({1}Año)) } >} distinct [CODIGO MACRO])
Or, you can use a pivot table instead of a straight table and use the following expression:
count({$<Año = >} distinct [CODIGO MACRO])
Then, you add Año as a dimension of the pivot table and move this dimension to be a horizontal line at the top of the expression.
Hope this helps,
Erich
Hi,
To ignore the Year selection use YearDimensionName=, MonthDimensionName=, and other Date dimensions
count({< YearDimensionName=, MonthDimensionName= >} distinct [CODIGO MACRO])
Hope this helps you.
Regards,
Jagan.
Thank you guys, Erich gave me the answer to my specific situation:
count({$<Año = {$(=max({1}Año) -1 ) } >} distinct [CODIGO MACRO])
count({$<Año = {$(=max({1}Año)) } >} distinct [CODIGO MACRO])
Since I would like to show actual and last year.
Thanks again