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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
HassanAshas
Helper V
Helper V

Comparing Multiple Values against a single Employee in a Table and performing Filtering

Hi, I have two datasets that I have merged with each other. The merged dataset looks like this, 

 

Emp_IDResource_NamePrimary CodeIsProjection
1HarisAFALSE
1HarisATRUE
1HarisBTRUE
2JackBFALSE
2JackBTRUE
3JohnCFALSE
3JohnBTRUE
4AliceBFALSE
4AliceBTRUE
4AliceCFALSE
4AliceC

TRUE

 

One dataset contains analysis of Employees working on Different Projects. It is possible for one employee to be working on multiple projects at the same time (for example, Alice is working on two projects at the same)


Other dataset contains Projections of the employees against different projects. 

 

My goal is to achieve a Tabluar visual that can show me the Employees Data whose projections were not equal to the actual projects. Also, I need to see the Projected Projects and the Submitted Projects against these Employees. For example, for the above dataset, my desired result would be the following table, 

 

HassanAshas_0-1688295844060.png

 

As you can see, for these two employees, Projected Projects are not equal to the Submitted Projects. For the other two people, projections are equal to the actual submitted projects.

 

I am unable to figure out a way to Filter my complete data in this Visual to only show the employees where Projected Projects are equal to the Submitted Projects. I have managed to create measures that concatenate the projected projects (or submitted projects) for every employee, however. The measures are as given below, 

 

 

Projected Projects = 

var _Selected = SELECTEDVALUE('dataset'[Emp_ID])
var _Result = 
    CONCATENATEX(
        FILTER(
            'dataset', 
            'dataset'[Emp_ID] = _Selected
            &&
            'dataset'[IsProjection]
        ),
         'dataset'[Primary Code],
        ", "
    )

return _Result

 

 

 

Submitted Projects = 
var _Selected = SELECTEDVALUE('dataset'[Emp_ID])
var _Result = 
    CONCATENATEX(
        FILTER(
            'dataset', 
            'dataset'[Emp_ID] = _Selected
            &&
            'dataset'[IsProjection] = FALSE()
        ),
         'dataset'[Primary Code],
        ", "
    )

return _Result

 

 

Can anyone help me out in this problem? Thank you.

 

If Anyone would like to download the Sample Power BI File, you may do so from here: https://drive.google.com/file/d/11hQFrXdHsEYt8z8I5m6ZIf5SebHpMdL-/view?usp=drive_link

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @HassanAshas 

Place the following measure in the filter pane of tge table visual, select"is not blank" then apply the filter 

FilterMeasure =
COUNTROWS (
FILTER (
VALUES ( 'dataset'[Emp_ID] ),
[Projected Projects] <> [Submitted Projects]
)
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @HassanAshas 

Place the following measure in the filter pane of tge table visual, select"is not blank" then apply the filter 

FilterMeasure =
COUNTROWS (
FILTER (
VALUES ( 'dataset'[Emp_ID] ),
[Projected Projects] <> [Submitted Projects]
)
)

@tamerj1 
Thank you so much! This worked like a charm! 
I was trying to do this same thing by using simple IF Condition, 

 

If ([Projected Projects] = [Submitted Projects], TRUE(), FALSE()) 

But that was just not working for me, for a reason I don't get. Thank you however for providing me a much more effective and a working approach! Really appreciate it. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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