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
prj102
Helper I
Helper I

Need help with Calculating a % from a table with duplicates

Need help to understand why this calulation is not working as expected.  The measure I'm using is below.  It's close but not perfect.  % of Assets is not calulating the percentage correctly and I've added the Expected Percentage column to show what I would expect to see.  The table / column I'm using (address) does contain duplicates.  I tried a formula with Distinct and it didn't seem to work as well.  I think I'm just looking for a calculation that does a distinct.

 

Measure

% of Assets = COUNTA('Table'[Address])/CALCULATE(COUNTA('Table'[Address]),ALLSELECTED())

 

StatusCount of Address% of AssetsExpected Percentage
Assets Successfully Measured313697.1138%94.94%
Assets Unsuccessfully Measured852.4655%2.57%
Offline180.1541%0.54%
Processing640.2665%1.94%
Totals330399.9999%100.00%
1 ACCEPTED SOLUTION
prj102
Helper I
Helper I

So I figured it out.  

 

I created a new measure

% Unique Assets = DISTINCTCOUNT('Table'[Address])
 
and changed the value to show value as Percent of grand total.

View solution in original post

1 REPLY 1
prj102
Helper I
Helper I

So I figured it out.  

 

I created a new measure

% Unique Assets = DISTINCTCOUNT('Table'[Address])
 
and changed the value to show value as Percent of grand total.

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.