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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to create a measure for selective filtering

Hello there, Apologies as I've probably not asked the question well, but I'll do my best to explain the problem. I am currently creating a Profit and Loss dashboard. But I've hit a bit of a snag with the filtering. Here is the main Dashboard below (sensitive data is blocked out). 

 

KyleAdam_1-1627905705830.png

Everything currently works fine besides one value (profit). The measurements add up correctly, hoewver, it still bills hours even though some Deals and Customers don't have a projects. 


Here is a measurement for the profit value. 

Profit = [Invoices Paid]-[PO Billed]-[Hours Billed]

The Hours BIlled part is what's important. Not all Deals or Customers have Projects, so when selected no projects appear on the Projects table (the top middle table). That's not an issue, however, the 812k hours  billed will still affect the profit, when I don't want it to. Here's what happens when I pick a select a deal (from the left side) that doesn't have a project. 

 

KyleAdam_2-1627906199910.png

As you can see it greatly effects the profit of any Deal or Customers that doesn't have a Project associated with it. It will give the default total value of all projects and minus it with the profit. 

I do understand why that is happening, because in my measure it is taking away hours billed. Is there a solution for this to rectify this problem? So that when a Deal or Customer doesn't have a project associated too it, the hours billed will be blank and not ruin the profit sum? Any help would be greatly appreciated, thank you. 



 



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Very sorry everyone, it turns out I just had to fix the relationship between two of my tables (Deals and Projects), they weren't filtered bothways, as soon as I filtered it both ways it worked properly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Very sorry everyone, it turns out I just had to fix the relationship between two of my tables (Deals and Projects), they weren't filtered bothways, as soon as I filtered it both ways it worked properly. 

Greg_Deckler
Community Champion
Community Champion

@Anonymous Are those measures in that formula? If so, what are the formulas for those measures?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.