cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Bergh
Helper I
Helper I

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors