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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
pranit828
Community Champion
Community Champion

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')





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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