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

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
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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.