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
Anonymous
Not applicable

Filter out Blanks without filtering other measure

I have two quick measures. One sums values that have been billed (Total Billed) to the client per job the other sums values I have been billed by subcontractors (Total Subcontrator Costs) per job. Not every job uses subcontractors so I am trying to filter out by usin gthe filter is not blank but that ends up also filtering the transaction of my Total Billed as well. How can I filter on just my Total Subcontractor Costs?

 

 

Total Sub Contractor Cost = 
CALCULATE(
	SUM('Dim_Job_Ledger_Entry'[Total Cost]),
	'Dim_Job_Ledger_Entry'[Posting Account No.]
		IN { "52200", "52100" }
)

Total Billed = 
CALCULATE(
	SUM('Dim_Job_Ledger_Entry'[Total Billed Price]),
	'Dim_Job_Ledger_Entry'[Posting Account No.]
		IN { "40200", "40300", "40400" }
)

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Try to create a measure and apply it to the visual level filter.

Measure = IF(ISBLANK([Total Sub Contractor Cost]),0,1)

test_Filter out Blanks without filtering other measure.PNG

 

Best Regards,
Liang
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

5 REPLIES 5
Greg_Deckler
Super User
Super User

@Anonymous Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Pragati11
Super User
Super User

HI @Anonymous ,

 

Your requirement is not clear as you have already created measures correctly.

can you share some sample data to understand how you want to use NOT BLANK filtering?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Sorry, @Pragati11 a better way of explaining it would be that I need DAX to ignore filters on the Total Billed measure. I'm trying to use ALL in the Total Billed measure but still filter the 3 accounts I've listed in the the measure.

CaptainHardhead_0-1597087107946.png

With the two measures I currently have I have blank values and I wan to filter those jobs out but when I do it also filters my Total Billed which I don't want to happen.

CaptainHardhead_1-1597087170266.png

 

@Anonymous  If you want to ignore filters on a measure, use ALLEXCEPT


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Anonymous ,

 

Try to create a measure and apply it to the visual level filter.

Measure = IF(ISBLANK([Total Sub Contractor Cost]),0,1)

test_Filter out Blanks without filtering other measure.PNG

 

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

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.

Top Solution Authors