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
Anonymous
Not applicable

Comparing Values across four different columns

Hi Team

 

So I have Four Columns which contains Employee ID's I have filtered it out  using a project Completed Date.

 

I want DIstinct count of Employee ID's across all four columns ?

 

How to Proceed ahead with it

8 REPLIES 8
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

But according to what you mentioned before, isn't what you want is the sum of the four columns of data combined and then not duplicated?

 

 

Best Regards

Lucien

Anonymous
Not applicable

yes I want that but let me tell you how so if you take these four columns and put in an excel sheet one below the other in same column and then remove duplicate you will get a distinct count of employee id ...

that would be the correct result .

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Pls test the below measure:

COUNT =
COUNTROWS (
    DISTINCT (
        UNION (
            CALCULATETABLE ( VALUES ( Sheet1[IdeaId] ), ALLSELECTED ( Sheet1 ) ),
            CALCULATETABLE ( VALUES ( Sheet1[IChampID] ), ALLSELECTED ( Sheet1 ) ),
            CALCULATETABLE ( VALUES ( Sheet1[ISpocID] ), ALLSELECTED ( Sheet1 ) ),
            CALCULATETABLE ( VALUES ( Sheet1[Idea Owner EmpId] ), ALLSELECTED ( Sheet1 ) )
        )
    )
)

vluwangmsft_0-1657100220214.pngvluwangmsft_1-1657100229343.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

Anonymous
Not applicable

Hi, 

 

It didn't work 

 it is just giving an over all count. As you saw in raw data some emp id repeats b/w these column .

 

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Not clearly.Could you pls share a sample data and expected output?Remember to remove confidential data.

 

 

Best Regards

Lucien

Anonymous
Not applicable

Anonymous
Not applicable

Hi 

So I have four columns in the sample data as you see.. 

Ispoc ID, Idea owner Id, Project manager Id, Ichamp Id

 

I want sum of distinct count of employee id in these four columns filtered on the basis of project completion date, & None of the Id's should be repeated in any of the column.

So in the below Example if I take sum of distinct count of each column it would be 20,

 

But when you compare values across 4 column few are repeated if we remove repeated then the count would be 13.

 

So this is the output that I want. 

 

Owner IDIspoc IDIchamp IDProject manager ID
161112
271010
3872
49813
5212
Anonymous
Not applicable

Sure

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.