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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Bergh
Helper II
Helper II

Duplicates in both columns

Hi. I have two columns that contain duplicates in both columns. I would like the right column to show several distinct values (because there are several weathers in the right column). The left column should calculate how many values there are in the left column. Huw do I do this i DAX?dubbletter.png

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

You can achieve this using the summarization option in table visual (if this is your end goal):

ValtteriN_0-1642145466327.png

ValtteriN_2-1642145538788.png

 



End result:

ValtteriN_1-1642145488299.png


However if you want to do this with DAX you can use SUMMARIZE:

DistinctExampleDAX = SUMMARIZE(DistinctExample,DistinctExample[Column1],"Distinct",DISTINCTCOUNT(DistinctExample[Column2]))

ValtteriN_3-1642145674417.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ValtteriN
Super User
Super User

Hi,

You can achieve this using the summarization option in table visual (if this is your end goal):

ValtteriN_0-1642145466327.png

ValtteriN_2-1642145538788.png

 



End result:

ValtteriN_1-1642145488299.png


However if you want to do this with DAX you can use SUMMARIZE:

DistinctExampleDAX = SUMMARIZE(DistinctExample,DistinctExample[Column1],"Distinct",DISTINCTCOUNT(DistinctExample[Column2]))

ValtteriN_3-1642145674417.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.