Link to home
Start Free TrialLog in
Avatar of route217
route217Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Convert a Power Formula into SQL Syntex

Hi Experts

What is the SQL equivalent of the following DAX (Power BI) Formula
AOV = CALCULATE(SUM(FACTSalesOrderTable[Gross_Order_Value]),ALLEXCEPT(FACTSalesOrderTable,FACTSalesOrderTable[increment_id]))


Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Don't know DAX but from a quick Google into ALLEXCEPT I'm not sure we have all the information for a direct port to SQL.

The docs mention that ALLEXCEPT applies a 'filter' if one exists.  That would likely be a CASE statement or a WHERE clause in SQL.

If you can provide some raw data and expected results from the provided data, we can provide the SQL to achieve the results.

Database product and version would help a lot as well.
SOLUTION
Avatar of Andrei Fomitchev
Andrei Fomitchev
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial