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
knightkblack
Frequent Visitor

Counting if a Value occurs regardless of duplicates

I'm trying to calculate how often certain employees finish a training course. The only issue is that some of the employees are in the system as having completed it twice. There is a column in the data for when the employee completed certain achievements. So in the raw data, the employee is appearing multiple times for each of these achievements. The way that this course achievement is tracked, is there is a specific code, 'TRNTRN' entered into their profile that signifies if they completed the course. 

 

 

What I had done is created a column with a simple if statement that said if the employee had 'TRNTRN', put a 1 otherwise put a 0. But then when I get the list of employees the total is increased because of the duplicates.  As you can see below some employees have a 2 which then increase the overall count. There are only 101 employees that have completed the course not 108. 

 

TRNTRN Duplicates chart.PNG

 

 

 

 

 

 

 

 

 

 

 

In the end, I'm just looking to know if an employee has completed the course, regardless of how many times. Any help would be appreciated!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@knightkblack,

 

You may add a measure as shown below.

Measure =
SUMX (
    SUMMARIZE ( Table1, Table1[Column1] ),
    CALCULATE ( MAX ( Table1[Column2] ) )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@knightkblack,

 

You may add a measure as shown below.

Measure =
SUMX (
    SUMMARIZE ( Table1, Table1[Column1] ),
    CALCULATE ( MAX ( Table1[Column2] ) )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.