Forum Discussion
JuicyJ35
2 years agoFrequent Visitor
Calculated Column based off conditions
My work has a new Ecommerce system and our sales enter our POS in a different format. Normally our online sales come from the store they are purchased and picked up from, but now the purchase has Eco...
- Anonymous2 years ago
Hi JuicyJ35 ,
Please try to create a new column with below dax formula:
Column = VAR tmp = FILTER ( 'Table', [Store] = "Ecommerce" && [Revenue] = 0 ) VAR _a = CALCULATE ( MAX ( 'Table'[Store] ), tmp ) VAR _b = CALCULATE ( MAX ( 'Table'[SaleID] ), tmp ) VAR _c = CALCULATE ( MAX ( 'Table'[Product Name] ), tmp ) VAR cur_store = [Store] VAR cur_saleid = [SaleID] RETURN IF ( cur_store = "Ecommerce" && cur_saleid = _b, _c )Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi JuicyJ35 ,
Please try to create a new column with below dax formula:
Column =
VAR tmp =
FILTER ( 'Table', [Store] = "Ecommerce" && [Revenue] = 0 )
VAR _a =
CALCULATE ( MAX ( 'Table'[Store] ), tmp )
VAR _b =
CALCULATE ( MAX ( 'Table'[SaleID] ), tmp )
VAR _c =
CALCULATE ( MAX ( 'Table'[Product Name] ), tmp )
VAR cur_store = [Store]
VAR cur_saleid = [SaleID]
RETURN
IF ( cur_store = "Ecommerce" && cur_saleid = _b, _c )
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.