Forum Discussion
Anonymous
3 years agoNot applicable
Conversion of SQL query into DAX expression
Hello, Hope you all are doing good. As i am a newbie to this DAX Expresssion i have a hard time converting the below SQL Query into DAX. Any answer would be much appreciated. I have 3 steps to do...
AntrikshSharma
Community Champion
3 years agoAnonymous Try this:
EVALUATE
FILTER (
ADDCOLUMNS (
CALCULATETABLE (
SUMMARIZE ( shipingdetails, shipingdetails[MATNBR], MATNBR[shipplant] ),
shipingdetails[BillingmonthKey] = shipingdetails[previousmonth],
NOT shipingdetails[soldby] IN { "20", "30", "40" }
),
"@InvoiceQty", CALCULATE ( SUM ( shipingdetails[invc_qty] ) ),
"@CreditAmt", CALCULATE ( SUM ( shipingdetails[sales_less_credits_amt] ) )
),
[@InvoiceQty] <= 3
|| [@CreditAmt] <= 10
)