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
Dunner2020
Post Prodigy
Post Prodigy

Does page level filter overwrite the conditions of measure

Hi there,

 

I have created a measure that calculates the unique count of events using the following measure:

Unique_count = CALCULATE(  DISTINCTCOUNT('Table'[Event_date]),   FILTER('Table','Table'[Notified_event]="TRUE" ||
('Table'[Event_type]="3" && 'Table'[Status]="1") ))

 

I have also applied Table['Status]="1" as a filter at the page level. When I ran the prog, the answer the above measure gave was 780.  However, when I included the Status value "2" (along with 1) as a filter at the page level, the above measure gave a different value (i.e. 970).

 

As you can see in the measure that I only considering the 'Status' value equal to 1. I do not consider other values of the status column. I was expecting that inclusion of status value 2 in the filter would not change the count of the measure. it would remain the same. Does the page level filter overwrites the condition of measure or am I missing something here?

The sample file can be download from here

 

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

Hi @Dunner2020 ,

Use the ALL function:
Returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.
Modify the measure to the following formula:

Unique_count = 
CALCULATE(
  DISTINCTCOUNT('Table'[Event_date]),
  FILTER(
    ALL('Table'),
    'Table'[Notified_event]= "TRUE" 
    || ( 'Table'[Event_type]="3" && 'Table'[Status]="1" )
  )
)

v-kkf-msft_0-1615269859076.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Dunner2020 ,

Use the ALL function:
Returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.
Modify the measure to the following formula:

Unique_count = 
CALCULATE(
  DISTINCTCOUNT('Table'[Event_date]),
  FILTER(
    ALL('Table'),
    'Table'[Notified_event]= "TRUE" 
    || ( 'Table'[Event_type]="3" && 'Table'[Status]="1" )
  )
)

v-kkf-msft_0-1615269859076.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

amitchandak
Super User
Super User

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.