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

Need help on filtering multiple values of same columns using And

sushma1412_Ind_0-1643349762955.png

This is my data .

Here i want  to find out count of employees who has done both Power BI and Azure.

As per data only Empid =1 is the only employee who has done both certifications and count should be one and that count i want to use in other calculations.

1 ACCEPTED SOLUTION
sushma1412_Ind
Frequent Visitor

Here is the solution .create a measure as below will give results
ABC =

var aTT = SUMMARIZE(
FILTER(ALL(Emp),Emp[Certification]="Power BI"),Emp[Empid],Emp[Certification])

var bTT = SUMMARIZE(
FILTER(ALL(Emp),Emp[Certification]="Azure"),Emp[Empid],Emp[Certification])

return



COUNTROWS(NATURALINNERJOIN(SELECTCOLUMNS(aTT,"EmployeeID",Emp[Empid]),SELECTCOLUMNS(bTT,"EmployeeID",Emp[Empid])))

View solution in original post

5 REPLIES 5
sushma1412_Ind
Frequent Visitor

Here is the solution .create a measure as below will give results
ABC =

var aTT = SUMMARIZE(
FILTER(ALL(Emp),Emp[Certification]="Power BI"),Emp[Empid],Emp[Certification])

var bTT = SUMMARIZE(
FILTER(ALL(Emp),Emp[Certification]="Azure"),Emp[Empid],Emp[Certification])

return



COUNTROWS(NATURALINNERJOIN(SELECTCOLUMNS(aTT,"EmployeeID",Emp[Empid]),SELECTCOLUMNS(bTT,"EmployeeID",Emp[Empid])))
Fowmy
Super User
Super User

@sushma1412_Ind 

You can create a the following measure

Count of Emp =
CALCULATE (
    DISTINCTCOUNT ( tablename(empid),
    tablename(certification) IN {"Power BI" , "Azure"} )
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy - This will work as OR condition and it will give the count of employees who has done power bi or Azure and we will get count as 2 but i want count as 1 who has done both Powerbi and Azure

@sushma1412_Ind 

 

The formula I shared should give you one as the result as I have used DISTINCTCOUNT.

If you use AND then you wont any results as a single row cannot contain both so please test it and reply

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

sushma1412_Ind
Frequent Visitor

any suggestions

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.