Forum Discussion
Anonymous
4 years agoNot applicable
Convert DAX calculated column formula to SQL
Hi All,
I have two tables:
Orders table (Contains 1 row per orders placed with customer and revenue data as whole)
Order line items table (Contains brief Order data with line items bought within the order)
I used below formula to create a new column in 'Orders' table' which is referring values from 'Order Line Items' table and assigning values in new column. Now I need to create a new column in 'Orders' table itself.
What is the SQL equivalent of the following DAX (Power BI) Formula:
Order Table column =
VAR Brand = CALCULATE ( SELECTEDVALUE ( 'Order Line Items'[Brand] ) )
RETURN
IF (
ISBLANK ( Brand ),
"Mixed Order",
Brand
)
1 Reply
- v-easonf-msftCommunity Support
Hi, Anonymous
Maybe you can try the following syntax to update the data in Column 'Brand‘.
Update TableName set xxxx where xxxxBest Regards,
Community Support Team _ Eason