Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I am in need of some assistance with a Dax formula. I have tried several variations of the formula below:
TotalPending = CALCULATE(SUM(SalesOrderLines[Net amount]), (SalesOrderLines[Line status])<>"Invoiced", ALLEXCEPT(SalesOrderLines,SalesOrderLines[Customer]),FILTER( ALL(SalesOrderLines[Created date]),[Created date]<=[LastD])))
but am unable to get the entire formula to work.
1. I am attempting to sum (SalesOrderLines[Net amount]
2. for only (SalesOrderLines[Line Status] <> "Invoiced"
and do the following
3. Ignore filter by the Date Slicer, but instead filter dates <= [LastD]
4. Ignore filter by the Customer Slicer
LastD=LastDate(DateTbl[Date])
I can get parts 1-3 above to work with the following formula:
TotalPending = CALCULATE(SUM(SalesOrderLines[Net amount]),SalesOrderLines[Line status]<>"Invoiced",FILTER( ALL(SalesOrderLines[Created date]),[Created date]<=[LastD]))
I'm struggling to wrap my head around "All" and "AllExcept". I'm stating the obvious when I say I've very new to DAX,
so any help is greatly appreciated.
Thank you
Solved! Go to Solution.
Thanks to your help, I was able to get the Dax syntax that I needed. The formula that seems to be working is:
TotalPending2 =
CALCULATE (
SUM ( SalesOrderLines[Net amount] ),
SalesOrderLines[Line status] <> "Invoiced",
ALLEXCEPT (SalesOrderLines,SalesOrderLines[Customer]), FILTER ( ALL ( SalesOrderLines[Created date] ), [Created date] <= [LastD] )
)
Again, I'm finding the All and the AllExcept a little confusing. Thank you again for your help.
Give this a try...Just removing filters from Customer column using ALL
TotalPending =
CALCULATE (
SUM ( SalesOrderLines[Net amount] ),
SalesOrderLines[Line status] <> "Invoiced",
FILTER ( ALL ( SalesOrderLines[Created date] ), [Created date] <= [LastD] ),
ALL ( SalesOrderLines[Customer] )
)
Zubair,
Thank you. However the formula still continues to respond to the Customer filter (slicer).
Thanks to your help, I was able to get the Dax syntax that I needed. The formula that seems to be working is:
TotalPending2 =
CALCULATE (
SUM ( SalesOrderLines[Net amount] ),
SalesOrderLines[Line status] <> "Invoiced",
ALLEXCEPT (SalesOrderLines,SalesOrderLines[Customer]), FILTER ( ALL ( SalesOrderLines[Created date] ), [Created date] <= [LastD] )
)
Again, I'm finding the All and the AllExcept a little confusing. Thank you again for your help.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |