Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ignore selection

Hi, How can I modify the following sentence in order to ignore the "Año" selection? Thanks.
count({$<Año = {$(=max(Año)) } >} distinct [CODIGO MACRO])
1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

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

View solution in original post

7 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try this

    

count({1<Año = {$(=max(Año)) } >} distinct [CODIGO MACRO])

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

=count({<Año = >} distinct [CODIGO MACRO])

Año = in set analysis, ignores the field selection.

Regards,

Jagan.

SunilChauhan
Champion
Champion

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

Sunil Chauhan
Not applicable
Author

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.

erichshiino
Partner - Master
Partner - Master

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

jagan
Luminary Alumni
Luminary Alumni

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.

Not applicable
Author

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