Forum Discussion
Changing Values Based on 2 Different Columns
- 1 year ago
maybe create a calculated column :
Invoiced Price =
VAR CurrentInvoice = 'Table'[Invoice #]
VAR HasPackage =
CALCULATE(
COUNTROWS('Table'),
ALLEXCEPT('Table', 'Table'[Invoice #]),
SEARCH("package", 'Table'[Product Description], 1, 0) > 0
)
VAR IsPackageRow = SEARCH("package", 'Table'[Product Description], 1, 0) > 0RETURN
IF(
HasPackage > 0,
IF(IsPackageRow, 'Table'[Total Cost], 0),
'Table'[Total Cost]
)
maybe create a calculated column :
Invoiced Price =
VAR CurrentInvoice = 'Table'[Invoice #]
VAR HasPackage =
CALCULATE(
COUNTROWS('Table'),
ALLEXCEPT('Table', 'Table'[Invoice #]),
SEARCH("package", 'Table'[Product Description], 1, 0) > 0
)
VAR IsPackageRow = SEARCH("package", 'Table'[Product Description], 1, 0) > 0
RETURN
IF(
HasPackage > 0,
IF(IsPackageRow, 'Table'[Total Cost], 0),
'Table'[Total Cost]
)
- Chipsahoy11 year agoHelper I
Thank you! This worked!