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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Invesco
Helper V
Helper V

Additional Filter to TRICKY DAX

Hi Experts

 

How would i apply an addtional filter to the following DAX

Measure =
  VAR __Table = FILTER('eda_edetailing_slides_used', [drmf_clm_presentation_slide_id] <> BLANK())
  VAR __Column1 = SELECTCOLUMNS(__Table,"__Column",[crm_call_name])
  VAR __Column2 = SELECTCOLUMNS(__Table,"__Column",[crmf_hcp_id])
RETURN
  COUNTROWS(DISTINCT(UNION(__Column1, __Column2)))

 Filter

eda_edetailing_slides_used[activity_type_1] IN {"f2f", "Virtual"}))

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

MyMeasure =
VAR __Table =
    FILTER (
        'eda_edetailing_slides_used',
        NOT ( ISBLANK ( [drmf_clm_presentation_slide_id] ) )
            && eda_edetailing_slides_used[activity_type_1] IN { "f2f", "Virtual" }
    )
VAR __Column1 =
    SELECTCOLUMNS ( __Table, "__Column", [crm_call_name] )
VAR __Column2 =
    SELECTCOLUMNS ( __Table, "__Column", [crmf_hcp_id] )
RETURN
    COUNTROWS ( DISTINCT ( UNION ( __Column1, __Column2 ) ) )

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

MyMeasure =
VAR __Table =
    FILTER (
        'eda_edetailing_slides_used',
        NOT ( ISBLANK ( [drmf_clm_presentation_slide_id] ) )
            && eda_edetailing_slides_used[activity_type_1] IN { "f2f", "Virtual" }
    )
VAR __Column1 =
    SELECTCOLUMNS ( __Table, "__Column", [crm_call_name] )
VAR __Column2 =
    SELECTCOLUMNS ( __Table, "__Column", [crmf_hcp_id] )
RETURN
    COUNTROWS ( DISTINCT ( UNION ( __Column1, __Column2 ) ) )

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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