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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dpotta
Resolver I
Resolver I

Use of ALL

I have a table of data named [GP Registered Patients 18 - 95+]

 

It looks like this

 

POSTCODEAGENUMBER_OF_PATIENTS
SE1 6ED181
YO23 1LR401
GU7 3NJ411
LS1 2ND421

 

I have a number of measures associated with this to use in conjunction with slicers and I am writing the measures that 'ignore slicers'

 

So for example, to count all patients and ignore slicers I am using 

 

ENG Number Of Adults 18 + = SUMX (ALL('GP Registered Patients 18-95+'), 'GP Registered Patients 18-95+'[NUMBER_OF_PATIENTS])

 

What I cannot do at the moment is write a measure which ignores slicers but retains the filter I have applied where AGE > 39 && AGE <80.

 

So, in the table above, the sum would be 3, even if i am filtering on postcode, or any other dimensions linked to this table.

 

Any help is appreciated!

 

Many thanks


D

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi, @dpotta 

You can create a Measure like the following.

 

EngNumberOfAudlits39-80 =

CALCULATE (

    SUM ( 'GP Registered Patients 18 - 95+'[NUMBER_OF_PATIENTS] ),

    FILTER (

        ALL ( 'GP Registered Patients 18 - 95+' ),

        'GP Registered Patients 18 - 95+'[AGE] > 39

            && 'GP Registered Patients 18 - 95+'[AGE] < 80

    )

)

 

The result looks like this:

v-cazheng-msft_0-1614839827850.png

Here is the pbix.

 

Best Regards

Caiyun Zheng

 

Is this the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-cazheng-msft
Community Support
Community Support

Hi, @dpotta 

You can create a Measure like the following.

 

EngNumberOfAudlits39-80 =

CALCULATE (

    SUM ( 'GP Registered Patients 18 - 95+'[NUMBER_OF_PATIENTS] ),

    FILTER (

        ALL ( 'GP Registered Patients 18 - 95+' ),

        'GP Registered Patients 18 - 95+'[AGE] > 39

            && 'GP Registered Patients 18 - 95+'[AGE] < 80

    )

)

 

The result looks like this:

v-cazheng-msft_0-1614839827850.png

Here is the pbix.

 

Best Regards

Caiyun Zheng

 

Is this the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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