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
jmoko
Regular Visitor

How to filter selection if it is contained in Row of column

Hello 

 

I am struggling to filter data if it is contained in a row : 

in my visual : 

 

FILTER 

A

B

C

D

E

F

G

 

ROWS

1- A;C

2- A;D;E

3- F;C;D;A

4- B-G

 

in my dashboard , if I Select "A" , then rows 1,2,3 would be returned 

I am not sure how to do that 

1 ACCEPTED SOLUTION

Hey @jmoko ,

 

I think I could solve that with a mapping table:

selimovd_0-1708349621665.png

 

The mapping table is represeting all possible combinations:

selimovd_1-1708349662436.png

 

This was done with a little more complex Power Query solution. The key element there was to translate the range (e.g. B-G) into numbers (2 - 7) and then expand this range and re-translate it to the letters. This in combination with the split by semicolon and an unpivot is returning the proper mapping table.

 

Please check the attached solution. The result looks like that:

MappingB-G.gif

 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic

 

View solution in original post

7 REPLIES 7
jmoko
Regular Visitor

Hello @selimovd 

Yes the range is taken from a different table ( may change ) , ie A to G 

but these can be anywhere in the row.

Hey @jmoko ,

 

I think I could solve that with a mapping table:

selimovd_0-1708349621665.png

 

The mapping table is represeting all possible combinations:

selimovd_1-1708349662436.png

 

This was done with a little more complex Power Query solution. The key element there was to translate the range (e.g. B-G) into numbers (2 - 7) and then expand this range and re-translate it to the letters. This in combination with the split by semicolon and an unpivot is returning the proper mapping table.

 

Please check the attached solution. The result looks like that:

MappingB-G.gif

 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic

 

Hi @selimovd 
Thank you so much for that , that would help but the data is not static and I don;t want to go and amend the table every time there is a change . Would you know how to populate the RowsMapping table from the ROWS table ? all are separated with semi colon within the row.

Hey @jmoko ,

 

my approach is dynamic. Where would you have an issue when the data is changing?

 

Best regards

Denis

Hello @selimovd 
Oh , I am soo sorry , I didn't realise you did it dynamically !!   that is perfect !!!   THANK YOU SOOOO MUCH !! 

Hey @jmoko ,

 

hehe, don't worry. I'm happy it worked eventually.

 

Best regards

Denis

selimovd
Super User
Super User

Hey @jmoko ,

 

there is a possibility with a mapping table.

The most difficult part is for sure the range (e.g. B-G). Before I put a lot of effort into this, the range will be single letters, like from A to G, right?

 

Thank you and best regards

Denis

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.