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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
WDHB01
Helper I
Helper I

Measure works now want to define which values it uses

This measure works

DNA = COUNTROWS(FILTER('pas tbl_OPAppt',CONTAINS('pas tbl_OPSMSSent','pas tbl_OPSMSSent'[EncounterNumber],'pas tbl_OPAppt'[EncounterNumber])))
 
But want to specify that the value in ActivityStatus column in the pas tbl_OPAppt', table = 'DNA
 
Any help appreciated.
1 ACCEPTED SOLUTION

I have fixed my problem this is the solution...

DNA = CALCULATE(COUNTROWS('pas tbl_OPAppt'),FILTER('pas tbl_OPAppt',CONTAINS('pas tbl_OPSMSSent','pas tbl_OPSMSSent'[EncounterNumber],'pas tbl_OPAppt'[EncounterNumber])), filter(all('pas tbl_OPAppt'), 'pas tbl_OPAppt'[ActivityStatus]= "DNA"))

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @WDHB01 

Try

DNA = CALCULATE(COUNTROWS('pas tbl_OPAppt'),FILTER('pas tbl_OPAppt',CONTAINS('pas tbl_OPSMSSent','pas tbl_OPSMSSent'[EncounterNumber],'pas tbl_OPAppt'[EncounterNumber])) && 'pas tbl_OPAppt'[ActivityStatus]= 'DNA')

Hi Pranit, thanks for the reply.

 

I received this error.

The syntax for '' '' is incorrect. (DAX(COUNTROWS(FILTER('pas tbl_OPAppt',CONTAINS('pas tbl_OPSMSSent','pas tbl_OPSMSSent'[EncounterNumber],'pas tbl_OPAppt'[EncounterNumber]))&& 'pas tbl_OPAppt'[ActivityStatus]' 'DNA'))).

I hadn't copied the measure correctly. Fixed that but now I get this error.
A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

I have fixed my problem this is the solution...

DNA = CALCULATE(COUNTROWS('pas tbl_OPAppt'),FILTER('pas tbl_OPAppt',CONTAINS('pas tbl_OPSMSSent','pas tbl_OPSMSSent'[EncounterNumber],'pas tbl_OPAppt'[EncounterNumber])), filter(all('pas tbl_OPAppt'), 'pas tbl_OPAppt'[ActivityStatus]= "DNA"))

Hi Pranit, thanks for the reply.

 

I received this error.

A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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