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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Hell-1931
Helper II
Helper II

Needed to add a condition into an existing DAX measure

I have the following measure -  'KPI Measures'[Undup Active Clients KPI] in DAX:

 

 MEASURE 'KPI Measures'[Undup Active Clients KPI] =
        VAR undupClientsServed =
            TREATAS (
                SUMMARIZE (
                    FILTER (
                        'Client Services',
                        'Client Services'[ClientWHID] > 0
                            && 'Client Services'[Is No-show] = FALSE ()
                            && 'Client Services'[Is Cancellation] = FALSE ()
                            && 'Client Services'[Is Non-claimable] = FALSE ()
                      ),
                       'Client Services'[ClientWHID]
                      ),
                       'Client Episode Metrics'[ClientWHID]
                           
                    --  FILTER('Client Episode Metrics',
                    --  'Client Episode Metrics'[AdmissionDate] <= 'Client Services'[Service Month])
                      )
         
          VAR result =
              CALCULATE ( [Undup Active Clients], undupClientsServed )
          RETURN
              result 

 

I need to add the condition for 'Client Episode Metrics' table which is now commented out in the above code:

 

FILTER('Client Episode Metrics',
       'Client Episode Metrics'[AdmissionDate] <= 'Client Services'[Service Month])

 

I am not sure if FILTER function needed in this case; I just need to insert the condition -

'Client Episode Metrics'[AdmissionDate] <= 'Client Services'[Service Month])  which is related to 'Client Episode Metrics' table written in TREATAS (it's TREATAS  because 'Client Episode Metrics' and 'Client Services' are NOT related (have no relations)

 

Please, HELP!

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Hell-1931 ,

 

I'm not clear about the specific data model, please try:

IF( 'Client Episode Metrics'[AdmissionDate] <= 'Client Services'[Service Month],'Client Episode Metrics'[ClientWHID])

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.