Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rifaymars
Helper I
Helper I

Filtering data for one column displaying all data for the next column

Hello guys,

 

I have this example table. I want to have a slicer to filter Part_Number. But i want in the result in Table visual to have all Document_No that consist this Part_Number, but as well as all othe  Part_Number wich are within this documents.

 

Document_NoPart_Number
TP-36014010101015
TP-36014010203007
TP-36014010203008
TP-36024010101015
TP-36024010203009
TP-36024010203008
TP-36034010203007
TP-36034010203008

 

 

Example:

In slicer I choose 4010203008. I want the data in Table Visual to be like:

Document_NoPart_Number
TP-36014010101015
TP-36014010203007
TP-36014010203008
TP-36034010203007
TP-36034010203008

 

I have tried CHAT GPT, bot no success.

Thnaks!

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Thanks for the reply from Kedar_Pande , please allow me to provide another insight: 
Hi  @rifaymars ,

 

Here are the steps you can follow:

1. Create a table of dates with no joins to act as a slicer.

Table 2 =
DISTINCT('Table'[Part_Number])

vyangliumsft_0-1734316516169.png

2. Create measure.

Flag =
var _select=SELECTEDVALUE('Table 2'[Part_Number])
var _test=CONCATENATEX(FILTER(ALLSELECTED('Table'),[Part_Number]=_select),[Document_No],"-")
return
IF(
    CONTAINSSTRING(
        _test,MAX('Table'[Document_No]))=TRUE(),1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1734316516170.png

4. Result:

vyangliumsft_2-1734316635585.png

 

As far as I know, [Document_No] has 4010203008 in TP-3601, TP-3602,TP-3603, so they all display

vyangliumsft_3-1734316635587.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Thanks for the reply from Kedar_Pande , please allow me to provide another insight: 
Hi  @rifaymars ,

 

Here are the steps you can follow:

1. Create a table of dates with no joins to act as a slicer.

Table 2 =
DISTINCT('Table'[Part_Number])

vyangliumsft_0-1734316516169.png

2. Create measure.

Flag =
var _select=SELECTEDVALUE('Table 2'[Part_Number])
var _test=CONCATENATEX(FILTER(ALLSELECTED('Table'),[Part_Number]=_select),[Document_No],"-")
return
IF(
    CONTAINSSTRING(
        _test,MAX('Table'[Document_No]))=TRUE(),1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1734316516170.png

4. Result:

vyangliumsft_2-1734316635585.png

 

As far as I know, [Document_No] has 4010203008 in TP-3601, TP-3602,TP-3603, so they all display

vyangliumsft_3-1734316635587.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

This is exacly what i wanted. Thnaks!

Kedar_Pande
Resident Rockstar
Resident Rockstar

@rifaymars 

Create a Calculated Table:

FilteredTable =
VAR SelectedParts = VALUES('YourTable'[Part_Number])
VAR RelatedDocs =
CALCULATETABLE(
VALUES('YourTable'[Document_No]),
'YourTable'[Part_Number] IN SelectedParts
)
RETURN
FILTER(
'YourTable',
'YourTable'[Document_No] IN RelatedDocs
)

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

I have tried  this but no success. What should I put in Slicer - Part_Number from the new table (FilteredTable )? And what should I put in Table View?

rifaymars_0-1734084011663.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.