Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
My Dax isn't returning an error, but it isn't working. It returns "2" - the lines with 8.65 and 9.79
Solved! Go to 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.
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.
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
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |