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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PowerBiPro2000
Frequent Visitor

Create a Distinct Count Column that can be summed to get a Distinct Count Total

Hello - I am trying to create a new column that will contain a fraction that when summed, it will equal the total number of distinct counts for a column.  In the Example Below, the Value I am trying to create would be .33333 because there are 3 ABC's and when summed it would equal 1 (1 distinct count).  ABD would be .5 since there are 2 ABDs.  If there were 4 values it would be .25, etc.

Column 1Value I am trying to create
ABC.3333
ABC.3333
ABC.3333
ABD.5
ABD.5
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PowerBiPro2000 ,

 

A new column =  1/ countX(filter(Table, [Column 1] = earlier([Column 1])), [Column 1])

 

Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@PowerBiPro2000 ,

 

A new column =  1/ countX(filter(Table, [Column 1] = earlier([Column 1])), [Column 1])

 

Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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