Forum Discussion
wildrose
6 years agoFrequent Visitor
Calculation With Multiple Case Statements Over Multiple Tables - Convert SQL to DAX
Hello All, I am new to DAX and struggling with how to acheive a conversion for this SQL. I am unclear how to convert a calculation with multiple Case statements across multiple tables to one in D...
- Anonymous6 years ago
Great to have help in some ways.
If I answer your question, please mark my post as a solution, this will also help others.
Please give Kudos for support.Tomas Santandreu Polanco |Principal Business Intelligence Consultant
www.designmind.com
wildrose
6 years agoFrequent Visitor
Hi Tomas,
Thank you for all your hints and suggestions. This is what worked. I am grateful for your help.
CALCULATE( SUMX(CUSTOMER_MATERIAL_DAILY_BILLING,'CUSTOMER_MATERIAL_DAILY_BILLING'[ADJ_ITEM_COST_LC_AMOUNT]*CUSTOMER_MATERIAL_DAILY_BILLING[EXCHANGE_RATE]),
BILLING_DOCUMENT_LINE_TYPE_REF[BILLING_LINE_ITEM_CATEGORY_CD] IN {"TANN","YBAN","YB1N","RENN","ZGNN","ZLNN"},
NOT MATERIAL[MATERIAL_HIERARCHY_LEVEL3_CD] IN {"CH000CH090CH090025"} , NOT SO_DOCUMENT_LINE_TYPE_REF[SO_DOCUMENT_REASON_CD] IN {"Z17","Z18","Z19","Z96","Z97","Z98"}
)
Anonymous
6 years agoNot applicable
Great to have help in some ways.
If I answer your question, please mark my post as a solution, this will also help others.
Please give Kudos for support.
Tomas Santandreu Polanco |Principal Business Intelligence Consultant
www.designmind.com