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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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