cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mkacavas Frequent Visitor
Frequent Visitor

Using results of a measure as a filter

 

 

I’m trying to use CONCATENATEX in order to filter deeper from an existing filter… if that makes sense.  I found this website: https://powerpivotpro.com/2017/03/latest-best-way-catchcaptureinspect-slicer-selections/

 

I applied his logic to my workbook but unfortunately it does not do what I want.

 

It works if I display the values in a table but I can’t use the values for further filtering.

 

For example, I start with selecting the part numbers that contain the part number grandchild pn1 using the ‘Attribute Slicer’ found in the marketplace, from there it shows a pareto of defects by hierarchy… I then select the level I’d like to focus on…  I’ll select 4-GreatGrandChild.  This shows me 7 defects of that part number consisting of 3 different parts at this level.  I then select one of the part numbers for example GreatGC PN1.

 

Sample 1.PNGSample 2.PNG

 

 

This shows that part number GreatGC PN1 consists in the following chains:

Child PN1,GrandChild PN1,GreatGC PN2,Parent PN1

Child PN1,G2GC PN2,GrandChild PN1,GreatGC PN1,Parent PN1

Child PN1,G2GC PN3,GrandChild PN1,GreatGC PN1,Parent PN1

Child PN1,G2GC PN4,GrandChild PN1,GreatGC PN1,Parent PN1

Child PN1,GrandChild PN1,Parent PN1

Child PN1,GrandChild PN1,GreatGC PN1,Parent PN1

Child PN1,GrandChild PN1,GreatGC PN3,Parent PN1

Child PN1,G2GC PN1,GrandChild PN1,GreatGC PN1,Parent PN1

 

I used the formula as a measure:  Selected All PNs = IF(NOT(ISFILTERED('Table Name'[All PNs])), "All", IF(COUNTROWS(ALLSELECTED('Table Name' [All PNs]))>50, ">50 PNs", CONCATENATEX( ALLSELECTED('Table Name' [All PNs]), 'Table Name' [All PNs], " /  ")))

 

To show me which parts consist in this chain.  I would like to then use this result to start over and filter from here.

 

 

I think what I need to do is un-concatenate this result in order to use within the ‘Attribute Slicer’ so I can filter like I did in Step 1.  I do not know how to take the result of a measure and un-concatenate it.  Any help would be greatly appreciated.

 

 

 

 

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Using results of a measure as a filter

Hi @mkacavas 

I cannot fully understand it.Could you explain more about your expected output?If you need further help,please follow the How to Get Your Question Answered Quickly to post your simple assumed data and expected output.It would be better if you can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mkacavas Frequent Visitor
Frequent Visitor

Re: Using results of a measure as a filter

What I'd like it to do:  Use the results the measure returns as the starting point of the next slicer.

 

I need to un-concatenate this string which is separated by commas and the backslash:

 

Child PN1,GrandChild PN1,GreatGC PN2,Parent PN1 / Child PN1,G2GC PN2,GrandChild PN1,GreatGC PN1,Parent PN1 / Child PN1,G2GC PN3,GrandChild PN1,GreatGC PN1,Parent PN1 / Child PN1,G2GC PN4,GrandChild PN1,GreatGC PN1,Parent PN1 / Child PN1,GrandChild PN1,Parent PN1 / Child PN1,GrandChild PN1,GreatGC PN1,Parent PN1 / Child PN1,GrandChild PN1,GreatGC PN3,Parent PN1 / Child PN1,G2GC PN1,GrandChild PN1,GreatGC PN1,Parent PN1

 

The part numbers are initially strings with commas as a delimiter... then the measure called Selected all PNs further strings along the sets separating them by a backslash.  I need to unconcatenate that group and use the part numbers as the starting point for my next filter to dig deeper into the set causing the defects.

mkacavas Frequent Visitor
Frequent Visitor

Re: Using results of a measure as a filter

Maybe I'm not wording this correctly... Is it possible to take the result of a measure and parse the data with the comma and backslash delimiters?

Community Support Team
Community Support Team

Re: Using results of a measure as a filter

Hi @mkacavas 

I'm afraid it's impossible to take the result of a measure as a filter.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.