Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
ctroude
Contributor II
Contributor II

How to add default filter on dimension in a Pivot Table ?

 

Hi,

I'm using a Pivot Table to print the data as described below.

Dimension :

I've got a 2 filters :

  • Customer
  • Business Type

Mesure :

I extract one value

  • Revenue

For instance :

Data before filter :

ctroude_0-1631016882680.png

I have to delete the filter : Type and select only Customer with a default Type.

Data with filter (Business Type =I)  :

ctroude_1-1631016882674.png

 

How can I add this default filter in the pivot table to print only the expected Customer ?

This filter must be a default filter means no need for the user to select the Business Type.

Only the customer for which the Business Type=I must be printed.

Thank to this the column Business Type will be not printed (deleted).

Thanks in advance for your help,

Regards,

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

You can make a calculated dimension in a similar way.

=Aggr(Only( {<$(=if(getselectedcount([Business Type])=0,'[Business Type]={'&chr(39) & 'I' & chr(39) & '}'))>} [Business Type]), [Business Type])

 

Uncheck "Include null values"

View solution in original post

4 Replies
stevejoyce
Specialist II
Specialist II

I dont totally follow.  But you can try this.  This will filter your Revenue measure to Business Type = I if no selections are made.  If user makes selection on this field it will take into account user's Business Type selection (update business type field and revenue field/calculation as needed)

=Sum( {<$(=if(getselectedcount([Business Type])=0,'[Business Type]={'&chr(39) & 'I' & chr(39) & '}'))>} Revenue)

ctroude
Contributor II
Contributor II
Author

Thanks for your quick answer.

Is-it possible to add a filter on dimension instead of mesure ?

stevejoyce
Specialist II
Specialist II

You can make a calculated dimension in a similar way.

=Aggr(Only( {<$(=if(getselectedcount([Business Type])=0,'[Business Type]={'&chr(39) & 'I' & chr(39) & '}'))>} [Business Type]), [Business Type])

 

Uncheck "Include null values"

ctroude
Contributor II
Contributor II
Author

Thanks for your answer.