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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vimina
Frequent Visitor

Data should not be filtered when a specific slicer is selected.

I am trying to calculate Average Incident count for each Branch, for eg: the average incident for BranchA is 4.88, but when the Employee ID & Name is selected then it will be filtered accordingly, I need to ignore that filter. The Sum of Incident should be filtered by Employee Name but Average Incident should be calculated for Branch and here Employee Name & Id should not be considered. I tried using ALL(TABLENAME) but it didnt help either. Same could be acheived by turning off the edit interaction for the slicer but I am looking for a measure to acheive this.

 

Attached pbix file for reference: https://drive.google.com/file/d/1Jrsv3NxAqAQ_OKtHu4PhNnyWvfPPXC4n/view?usp=share_link 

 

vimina_0-1682162793967.png

1 ACCEPTED SOLUTION
DOLEARY85
Super User
Super User

Hi,

 

try this:

 

AVG INCIDENT = DIVIDE(CALCULATE(SUM(INCIDENT[INCIDENT_COUNT]),REMOVEFILTERS(EMPLOYEE[EMPLOEE NAME & ID])),CALCULATE(DISTINCTCOUNT(EMPLOYEE[EMPLOYEE_ID]),REMOVEFILTERS(EMPLOYEE[EMPLOEE NAME & ID])))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

View solution in original post

1 REPLY 1
DOLEARY85
Super User
Super User

Hi,

 

try this:

 

AVG INCIDENT = DIVIDE(CALCULATE(SUM(INCIDENT[INCIDENT_COUNT]),REMOVEFILTERS(EMPLOYEE[EMPLOEE NAME & ID])),CALCULATE(DISTINCTCOUNT(EMPLOYEE[EMPLOYEE_ID]),REMOVEFILTERS(EMPLOYEE[EMPLOEE NAME & ID])))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.