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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to leave rows out of calculation when filters applied?

Gday, 

 

I'm relatively new to PBI and a measure I was previously using is now not functioning properly as I've applied a new dimension and filter to the data. The previous measure was:

Weekly_Availability = IF('Measures Table'[Total_Project_Manning] > 1, 0, 1- [Total_Project_Manning])
This measure would return a number between 0 and 1 depending on what availability the relevant category had. I now need to filter by another dimension but when I do this the filtered out rows go to zero and the measure then shows (1 - 0 = 1) whereas I need people to not show on the visual at all if filtered out.
 
Thanks in advance.
 
4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

Did you take amit's advice?

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
If not, please upload some insensitive data samples and expected output.
You should check the forum Featured first:
 
 
Best Regards,
Community Support Team _ Janey
Anonymous
Not applicable

Thanks @amitchandak. The issue is that sometimes people are over allocated so I still require the condition if [Total_Project_Manning] > 1, 0. This means that if they are overallocated they have no availability. 

 

My issue is that when the filter of department is applied, it will bring the value to zero for the people not in that department and so it shows every person outside the department on the visual. Whereas I just need to see availability of people within a single department when filtered by slicer.

@Anonymous , Again force the department filter. Refer to my example of a date where I added +0 and again forced the date filter

 

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

 

 

You will need like

filter(department, department[Name] in allselected(department[Name] ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Anonymous , what ever you do not want to show, should return blank

example

Weekly_Availability = IF('Measures Table'[Total_Project_Manning] > 1, blank(), 1- [Total_Project_Manning])

 

Or use this in visual level filter and check for value 1 or 0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.