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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors