Skip to main content
Solved

Exclude all the accounts starting by 5123xxxx

  • Apr 15, 2024 1:07 PM UTC
  • 8 replies
  • 403 views

Forum|alt.badge.img+7

Hello,

What formula can I use  in order to Exclude all the accounts starting by 5123xxxx ?

Thanks for your help,

Best answer by Benoit

Hi again, I believe you might have got the arguments in the wrong order, please try:

[EXCLUDE: startwith( “5123”, 'Compte comptable'.'Account number')]

 

The function begins with the value to find, then the data range to search.

View original

8 replies

francois
Employee
Forum|alt.badge.img+13
  • Employee
  • Apr 15, 2024 1:09 PM UTC

Hi Cédric,

Not sure what your formula looks like, but here a few functions that could be helpful
 

 

If you have a concrete example, I’ll be happy to guide you further.

Hope this helps!


Forum|alt.badge.img+7
  • Author
  • Master Author
  • Apr 15, 2024 1:16 PM UTC

I have a metric using the below dimension named “ Compte comptable” but i want to exclude the “Compte comptable” starting by 5123xxx, how can I combine the 2 functions you mentioned to do so  ? 

 


francois
Employee
Forum|alt.badge.img+13
  • Employee
  • Apr 15, 2024 1:20 PM UTC

How about Metric[EXCLUDE: STARTSWITH("5123", 'Compte comptable'.Name)]?
You could also add a specific boolean property in your dimension and use that for the exclusion Metric[EXCLUDE: 'Compte comptable'.'Compte 5123xxxx']

I’m assuming you want to filter the data, not the view


Forum|alt.badge.img+7
  • Author
  • Master Author
  • Apr 15, 2024 2:26 PM UTC

I tried the first formula, i have no error but when i run the formula but i still have the 5123xxx accounts.

 


Benoit
Community Manager
Forum|alt.badge.img+17
  • Community Manager
  • Apr 15, 2024 2:31 PM UTC

The dimension items will always be present in your dimension, but using your formula, they should not return any data.

If you don’t wish to see them in your view, you can simply hide them using the filtering options:

As they’re empty, you will not see them once hidden.

Hope this helps.


Forum|alt.badge.img+7
  • Author
  • Master Author
  • Apr 15, 2024 2:36 PM UTC

I already have this filter apply but i still have some value displayed.
 

 


Benoit
Community Manager
Forum|alt.badge.img+17
  • Community Manager
  • Answer
  • Apr 15, 2024 3:10 PM UTC

Hi again, I believe you might have got the arguments in the wrong order, please try:

[EXCLUDE: startwith( “5123”, 'Compte comptable'.'Account number')]

 

The function begins with the value to find, then the data range to search.


Forum|alt.badge.img+7
  • Author
  • Master Author
  • Apr 15, 2024 3:29 PM UTC

It’s working well :) 
Thanks for your help