Powerpivot filter - Does not contain

kshen

New Member
Joined
Feb 21, 2017
Messages
4
Hi, I'm in Powerpivot trying to place a filter in the design wizard for a dimension which is "does not contain" a string of 4 letters "rlsa"(vs operator = contains)

Is there a way I can easily do this? I've been searching the MDX operator commands and I can't find anything

thanks!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You could either create a calculated column if you need to use slicers or report filters or a measure and filter your data against that measure.

For the calculated column you can use ISERROR and SEARCH just like you would in Excel and you can the filter all TRUE rows.
Code:
rlsaNotFoundColumn =
ISERROR ( SEARCH ( "rlsa", YourTable[YourColumn] ) )

For the measure you can use SUMX to count all rows where "rlsa" cannot be found. You can use this measure to filter your pivot at any level.
Code:
rlsaNotFoundMeasure :=
1
    * (
        SUMX ( TableCC, IF ( ISERROR ( SEARCH ( "rlsa", TableCC[Column1] ) ), 1 ) ) > 0
    )

I hope it helps.
 
Upvote 0
Sorry I should have clarified. I'm trying to do this in the filter section itself, not using calculated column because if I pull this field into my table it 100x my number of rows.
 
Upvote 0
Sorry I should have clarified. I'm trying to do this in the filter section itself, not using calculated column because if I pull this field into my table it 100x my number of rows.

You can drag the calculated column into the Report Filter area without adding any rows to the table.
 
Upvote 0
Thanks! didn't know about the calculated members function
I can't use the search function. It's saying its not available in sql server 2014.
I tried using instr and a couple others but it wasn't able to convert the dimension into a string
 
Upvote 0
That is weird since it is not a new function. The msdn reference page for SEARCH has articles for 2008 R2 and 2012 as well.

The problems seems to be beyond my knowledge of DAX, but maybe some screenshots with sample data and the error messages could help someone else to find a solution for you.
 
Upvote 0
tinypic.com
[/URL][/IMG]
tinypic.com
[/URL][/IMG]
 
Upvote 0
I now understand that you are not using PowerPivot (that uses DAX) and you were asking for help with MDX. I am clueless when it comes to MDX, but this could be easily done in PowerPivot using DAX.
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top