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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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