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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
koorosh
Post Partisan
Post Partisan

Filtering

Hello Experts,

Through the following table, I am looking for 3 tables by DAX.

1- A table that shows all users that have 3 certifications A,B,C (complete certification)

2 A table that shows the users and their certifications and missed certifications

3- A table that shows users that have not any certification.

 

koorosh_0-1647672898217.png

 

2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@koorosh 

Here are table codes

EVALUATE 
FILTER (
    VALUES ( Table1[User] ),
    COUNTROWS (
        INTERSECT (
            CALCULATETABLE ( VALUES ( Table1[Certification] ) ),
            { "Cert A", "Cert B", "Cert C" }
        )
    ) = 3
)

EVALUATE
ADDCOLUMNS (
    CROSSJOIN (
        VALUES ( Table1[user] ),
        SELECTCOLUMNS ( { "Cert A", "Cert B", "Cert C" }, "Cert", [Value] )
    ),
    "Status",
        VAR _cert = [Cert]
        RETURN
            IF (
                CALCULATE ( ISEMPTY ( FILTER ( table1, table1[Certification] = _cert ) ) ),
                "Missing",
                "Certified"
            )
)

EVALUATE 
FILTER (
    VALUES ( Table1[User] ),
    COUNTROWS (
        INTERSECT (
            CALCULATETABLE ( VALUES ( Table1[Certification] ) ),
            { "Cert A", "Cert B", "Cert C" }
        )
    ) = 0
)


Check the attached file below my signature

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

View solution in original post

CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1647680038791.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

6 REPLIES 6
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1647680038791.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

tackytechtom
Super User
Super User

Hi @koorosh ,

 

Here the third one:

tomfox_3-1647679840340.png

 

Table3 = 
FILTER ( 
    SUMMARIZE (
        'Table',
        Table[User],
        "NumberOfDistinctCertifications", 
        CALCULATE ( 
            DISTINCTCOUNT ( Table[Certification] ), Table[Certification] in {"Cert A", "Cert B", "Cert C"} ),
        "NumberOfDistinctCourses", 
        CALCULATE ( 
            DISTINCTCOUNT ( Table[Certification] ), Table[Certification] in {"course"} )       
    ),
    [NumberOfDistinctCourses] > 0 && [NumberOfDistinctCertifications] < 1
)

 

Does this help? 🙂

 

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 


Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Fowmy
Super User
Super User

@koorosh 

Here are table codes

EVALUATE 
FILTER (
    VALUES ( Table1[User] ),
    COUNTROWS (
        INTERSECT (
            CALCULATETABLE ( VALUES ( Table1[Certification] ) ),
            { "Cert A", "Cert B", "Cert C" }
        )
    ) = 3
)

EVALUATE
ADDCOLUMNS (
    CROSSJOIN (
        VALUES ( Table1[user] ),
        SELECTCOLUMNS ( { "Cert A", "Cert B", "Cert C" }, "Cert", [Value] )
    ),
    "Status",
        VAR _cert = [Cert]
        RETURN
            IF (
                CALCULATE ( ISEMPTY ( FILTER ( table1, table1[Certification] = _cert ) ) ),
                "Missing",
                "Certified"
            )
)

EVALUATE 
FILTER (
    VALUES ( Table1[User] ),
    COUNTROWS (
        INTERSECT (
            CALCULATETABLE ( VALUES ( Table1[Certification] ) ),
            { "Cert A", "Cert B", "Cert C" }
        )
    ) = 0
)


Check the attached file below my signature

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

Thanks Mohammed, If the excel data source has more columns and I want to include them in the T1 and T2, wherein Dax for T1 and T2, I should bring them? For example name of the company of each user and the date of each certification.

@koorosh 

Yes, you can do it by using these tables as filters in a CALCULATEDTABLE function.

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

tackytechtom
Super User
Super User

Hi @koorosh ,

 

Here the first one:

 

tomfox_0-1647679102921.png

 

Table1 =
FILTER ( SUMMARIZE ( FILTER ( 'Table', Table20[Certification] in {"Cert A", "Cert B", "Cert C"} ), Table[User], "NumberOfDistinctCertifications", DISTINCTCOUNT ( Table[Certification] ) ), [NumberOfDistinctCertifications] = 3 )

 

Does this help? 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.