Taking Common items in two columns

Hi All,

I have a table where there are pack type/offer columns.
There are few row items in two columns which are common.
How can I take only the items that are common.

image

I want to take only those columns that are highlighted.

Kindly help me.

Thanks & REgards,
Hari G

Hi,

You can achieve your above objective through Calculated column where you can make a flag column and you can put the below dax in that column:

Flag = if([col1]=[col2],“Y”,“N”)

While using it you can put it on your page or visual level filter.

Other you can do it in M query

I created the below dataset to show the sol:
image

We can simply filter it by the below M code :
= Table.SelectRows(#“Changed Type”, each [Column2] = [Column1])

By Appling above step you got your desired result:
image

Attaching the pbix so you can see the M query :
EDNA_Example.pbix (22.9 KB)

3 Likes

Hi @Anurag ,

Thank you very much. Is it possible to do it only at a visual level rather than table level.

Thanks & Regards,
Hari G

Hi,

My first option with calculated column will help you there .
You can put flag for that visual where you want this effect and select “Y”
This will do the trick.

Thanks,
Anurag

Hi @Anurag ,

My sincere apologies, i missed it up. Like everything is in the same column only as offers only the manufacturer differs. IN this case how can i do this. In the image above just think of it like this,
Manufacturer is a column and offer is another column

image

this is the raw data. I want only those common offers at a visual level

Thanks
Hari G

Hi,

Sorry i am not able to get your point from the above data on which visual you want to use and if possible what will be the expected output .

Let me know the output i try to help you .

Thanks,
Anurag

Hi @Anurag ,

Kindly see the image below:

I want to take those columns which are common for both the manufacturers.

Thanks
Hari G

Hi @HariGanesan

Please share a sample PBIX file and clear requirements.

Thanks
Ankit J

Hello @HariGanesan, it’s been a while since we got a response from you.

Just following up if you still need help with your inquiry?

If you do, kindly provide the information the experts requested above so they can help you further.

In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.