This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
I am pretty new to DAX and am trying to do a count on some invoicing costs issues, there are some filters that need to apply to show what a true cost issue is. I have got the below to work the way I wanted but I am getting memory issues and the visuals will only work when a store is selected on my report. Any ideas on how to optimize this would be greatly appreciated.
Can you try this?
Cost Issue Count =
CALCULATE (
COUNTROWS ( Invoices ),
FILTER (
Invoices,
[Cost Issue] < 0
&& [Est GP %] < 0.20
&& [CurrentSellInc] > 0
&& [CurrentSellLocationCode] <> "CLR"
&& [Invoice Status] <> "Killed"
),
FILTER (
'POS Item Details',
[ModuleItem] = "F"
&& [PillarName] <> "Prescriptions"
)
)
Hi @NAV_81
Its bit difficult to say if this issue is due to measure only since memory issue can be related to your data model as well. If you could share your precised data model so we might help you more specifically.
But in the mean time can you try below code?
Cost Issue Count =
CALCULATE (
COUNTROWS ( Invoices ),
FILTER (
Invoices,
[Cost Issue] < 0
&& [Est GP %] < 0.20
&& [CurrentSellInc] > 0
&& [Invoice Status] <> "Killed"
&& [CurrentSellLocationCode] <> "CLR"
),
FILTER (
'POS Item Details',
[ModuleItem] = "F"
&& [PillarName] <> "Prescriptions"
)
)
Thank you,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 27 | |
| 23 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 50 | |
| 30 | |
| 25 | |
| 24 |