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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Reine
Helper IV
Helper IV

How to calculate with multiple filters

Hi all - I'm trying to return a count of items based on a few filters and can't quite figure it out.  A sample of my table is below.  "Total Charges" and "Paid Per Unit" are calculated columns.   I want to count how many line items have a "Paid Per Unit" value of under $10 but more than $0 and does not have anything in the "Description" column.  For this sample data it should return 1 - just the line with a Paid Per Unit of $5.33.

 

sample data.png

 

My Dax isn't returning an error, but it isn't working.  It returns "2" - the lines with 8.65 and 9.79    

 

Under $10  =
CALCULATE (
COUNT ( ChargesT[Paid Per Unit] ),
FILTER (
ChargesT,
ChargesT[Paid Per Unit] < 10.00
),
( ChargesT[Paid Per Unit] <> 0.00 ),
(
NOT (
ISBLANK ( ChargesT[Description] )
)
)
)
 
I appreciate any help.  I'm coming to PBI from Excel and learning as I'm reporting so still struggling with understanding the differences in how it works.
1 ACCEPTED SOLUTION

Thank you both @amitchandak  @lc_finance 

 

Neither of those worked, but your responses helped me think about it a little differently and, with some googling, I did figure it out!  Instead of using NOT ISBLANK to filter out rows where there was something in the Description column,  I used  = BLANK() to count just the rows where that column is blank.  So, along with my other criteria, my measure now returns the correct number.

View solution in original post

4 REPLIES 4
lc_finance
Solution Sage
Solution Sage

Hi @Reine ,

 

 

what about the following formula:

 

CALCULATE (
COUNT ( ChargesT[Paid Per Unit] )
, ChargesT[Paid Per Unit] < 10.00
, ChargesT[Paid Per Unit] <> 0.00
, NOT ( ISBLANK ( ChargesT[Description] ))

)

Does it work?

 

LC

Interested in Power BI templates? Check out my blog at www.finance-bi.com

 

 

Please try using the filter

 

CALCULATE (
COUNT ( ChargesT[Paid Per Unit] )
filter(ChargesT, ChargesT[Paid Per Unit] < 10.00
, ChargesT[Paid Per Unit] <> 0.00
, NOT ( ISBLANK ( ChargesT[Description] ))
)
)

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you both @amitchandak  @lc_finance 

 

Neither of those worked, but your responses helped me think about it a little differently and, with some googling, I did figure it out!  Instead of using NOT ISBLANK to filter out rows where there was something in the Description column,  I used  = BLANK() to count just the rows where that column is blank.  So, along with my other criteria, my measure now returns the correct number.

Nice to hear that your measure is now working for you! 

 

Do not hesitate if you need further help,

 

LC

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.