Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
JonathanKelly
Contributor III
Contributor III

Filter by 1 dimension only

I several count calculations that I need to be unaffected by everything except for 1 field. I want to be able to filter my top pivot for a company so it narrows down from company A-Z to just A, B and C or any combination of letters.

Further down however I have a couple more pivot tables that have calculations based around a date being selected as well as the original selection of companies. 

How can I get my top pivot to filter down for my company but remain unaffected by the dates? 

I have used a master calander in this document due to me having multiple date fields if this has any effect on a set expression.  

I had used the following formula: {1<[Company]=P([Company])>} which seemed to work but after amending the company field slightly it has stopped functioning. Reverting back to the original layout and load it still fails.  

Labels (5)
1 Solution

Accepted Solutions
rubenmarin

Hi, with that filter, if there is a date (or other selection) without relation with a company, it will remove that company, as it won't be on the P(), maybe with:

{1<[Company]={$(=chr(39)&GetFieldSelections(Company,chr(39)&','&Chr(39))&chr(39))}>}

But this won't work if no companies are selected, so maybe:

If(GetSelectedCount(Company)
  ,...{1<Company={$(=chr(39)&GetFieldSelections(Company,chr(39)&','&Chr(39))&chr(39))}>}...
  ,...{1}...
)

View solution in original post

2 Replies
rubenmarin

Hi, with that filter, if there is a date (or other selection) without relation with a company, it will remove that company, as it won't be on the P(), maybe with:

{1<[Company]={$(=chr(39)&GetFieldSelections(Company,chr(39)&','&Chr(39))&chr(39))}>}

But this won't work if no companies are selected, so maybe:

If(GetSelectedCount(Company)
  ,...{1<Company={$(=chr(39)&GetFieldSelections(Company,chr(39)&','&Chr(39))&chr(39))}>}...
  ,...{1}...
)
JonathanKelly
Contributor III
Contributor III
Author

Thank you for that but like you said it doesn't work if no companies are selected;

Count({1<[Company]={$(=chr(39)&GetFieldSelections(Company,chr(39)&','&Chr(39))&chr(39))}>}if(
[Status]='Allocated',[Status]))

Thats an example of one of the calculations they all follow that pattern as i'm splitting individual status to get a breakdown. 

How would I incorporate into the above your second suggestion sorry I didn't quite understand.