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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Seabastein
Frequent Visitor

Find if there are redundancies in 4 different columns

Hello,

 

I would like to know if there is any way to know if the same value can be found on the same line across 4 different columns.

It doesn't matter what the value is (it is only going to be numbers) and in which column it is, as long as this value is present at least twice (example below). I couldn't find any formula that does the job.

Seabastein_0-1650349491090.png 

And is it a lot more complicate to return the value as the example below? 

Seabastein_1-1650349755030.png

 

Thank you so much in advance for taking the time to help me, I appreciate it !

Greetings, 

Seb

 

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Seabastein ,

 

You could try this:-

 

Column = 
SWITCH(TRUE(),
('Table (3)'[Column1] = 'Table (3)'[Column2] || 'Table (3)'[Column1] = 'Table (3)'[Column3] || 'Table (3)'[Column1] = 'Table (3)'[Column4]),'Table (3)'[Column1],
('Table (3)'[Column2] = 'Table (3)'[Column4]) || ('Table (3)'[Column2] = 'Table (3)'[Column3]),'Table (3)'[Column2],
('Table (3)'[Column3] = 'Table (3)'[Column4]),'Table (3)'[Column3])

Output:-

Samarth_18_0-1650353838512.png

 

 

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

2 REPLIES 2
Seabastein
Frequent Visitor

Thank you so much Samarth, it works well

Samarth_18
Community Champion
Community Champion

Hi @Seabastein ,

 

You could try this:-

 

Column = 
SWITCH(TRUE(),
('Table (3)'[Column1] = 'Table (3)'[Column2] || 'Table (3)'[Column1] = 'Table (3)'[Column3] || 'Table (3)'[Column1] = 'Table (3)'[Column4]),'Table (3)'[Column1],
('Table (3)'[Column2] = 'Table (3)'[Column4]) || ('Table (3)'[Column2] = 'Table (3)'[Column3]),'Table (3)'[Column2],
('Table (3)'[Column3] = 'Table (3)'[Column4]),'Table (3)'[Column3])

Output:-

Samarth_18_0-1650353838512.png

 

 

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.