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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Lew_14
Frequent Visitor

Measures based on table containing duplicates

Hello,

 

A bit of background - the data i'm working with shows information relating to audits and there is one row of data for each question in the audit. The 'PublishedRecordID' field shows the audit each question relates to but the 'Total Score' and 'Total Possible Score' fields relate to the overall audit score, not the score for that question (data example and expected result below).

 

Data Example (Table Name - Audits)   Expected Result 
PublishedRecordIDTotal ScoreTotal Possible Score PublishedRecordIDScore (%)
1510 150.00%
1510 20.00%
1510 380.00%
2023   
2023   
2023   
31620   
31620   

 

I'm trying to work out the percentage score at audit level and have so far achieved this by taking a copy of the table and removing all duplicates based on the 'PublishedRecordID', which works fine in terms of calculating the score. It's becoming more troublesome using this method as there are a multiple slicers in the report that don't always work across both of the tables (the original and the de-duped version). I've attempted to calculate the score in my original table (ignoring any duplicates) but it's giving me slightly different scores to those from the de-duped version and i can't quite work out why. It's a simple calculation and the DAX i'm using in the table containing duplicates is below.

 

Score % = (CALCULATE(SUMX(Audits,Audits[Total Score]),Audits[PublishedRecordId]))/(calculate(SUMX(Audits,Audits[Total possible Score]),Audits[PublishedRecordId]))
 
Any help or guidance would be appreciated!
 
Thanks
 
 
1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Lew_14 not sure if that's what you meant but I get the result you want:

SpartaBI_0-1655216061475.png

 

Measure = 
IF(
    HASONEVALUE('Table'[PublishedRecordID]),
    DIVIDE(SUM('Table'[Total Score]), SUM('Table'[Total Possible Score]))
)

 

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

View solution in original post

1 REPLY 1
SpartaBI
Community Champion
Community Champion

@Lew_14 not sure if that's what you meant but I get the result you want:

SpartaBI_0-1655216061475.png

 

Measure = 
IF(
    HASONEVALUE('Table'[PublishedRecordID]),
    DIVIDE(SUM('Table'[Total Score]), SUM('Table'[Total Possible Score]))
)

 

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors