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
Anonymous
Not applicable

Updating measure

Hi

 

Please I need suggestions on how to solve this issue. ,

 

I have a table A, which has  4 columns, Locations, Trials and Interventions.  The task is to count the trials and interventions which have a United Kingdom  location. 

 

Capture.JPG

 

 Currently I have a manual workaround which relies on a filter.  And I use two cards to display the count of Trials and Interventions respectively. However this means that I have to regularly check the filter to ensure that all values with United Kingdom is selected -- see below.  Capture2.JPG

 

 

Please any suggestions on the DAX formula to  count of the number of Trials and Intervention where the

location column has a United Kingdom entry and display this value on a measure.

 

Thank you

PhyllisN

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Just try the following two measure:

 

 

 

CountTrail = CALCULATE(DISTINCTCOUNT('Table'[Trials]),ALL('Table'),IFERROR(SEARCH("United Kingdom",'Table'[Locations]),-1) > 0)
CountInterventions = CALCULATE(DISTINCTCOUNT('Table'[Interventions]),ALL('Table'),IFERROR(SEARCH("United Kingdom",'Table'[Locations]),-1) > 0)

 

 

 

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

10 REPLIES 10

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.