Forum Discussion
ANB_13
3 years agoHelper I
Help Excel formula to Dax
Hello everyone, Please, someone can help me to covert this excel formula to DAX ? "=IF(OR([@[NATURE CODE 1]]="A",[ @[NATURE CODE 1]]="W");([@[%VOL. CN1]]/100)*[@[GROSS MASS (kg)]];0...
- 3 years ago
Hi, ANB_13
try this one:
= IF(
OR(
TableName[NATURE CODE 1] = "A",
TableName[NATURE CODE 1] = "W"
),
(TableName[%VOL. CN1] / 100) * TableName[GROSS MASS (kg)],
0
) + IF(
OR(
TableName[NATURE CODE 2] = "A",
TableName[NATURE CODE 2] = "W"
),
(TableName[%Vol. CN2] / 100) * TableName[GROSS MASS (kg)],
0
)replace the table with your appropriate table name.
rubayatyasmin
3 years agoCommunity Champion
Hi, ANB_13
try this one:
= IF(
OR(
TableName[NATURE CODE 1] = "A",
TableName[NATURE CODE 1] = "W"
),
(TableName[%VOL. CN1] / 100) * TableName[GROSS MASS (kg)],
0
) + IF(
OR(
TableName[NATURE CODE 2] = "A",
TableName[NATURE CODE 2] = "W"
),
(TableName[%Vol. CN2] / 100) * TableName[GROSS MASS (kg)],
0
)
replace the table with your appropriate table name.