Forum Discussion
BartVlek
6 years agoHelper II
Problems with syntax in combination with Related
I am having problems with getting the syntax right for the following expression: CostPrice = IF ( (RELATED ( 'discount'[percentage] ) = 0, ( 'total'[PAMP] ), ( ( 'total'[AMOUNT] ) * ( RELATED...
amitchandak
6 years agoSuper User
BartVlek , Are these two tables joined? Are you creating a measure or a column?
Can you share sample data and sample output.
If it a column this should work
CostPrice =
IF (RELATED ( 'discount'[percentage] ) = 0, 'total'[PAMP] , 'total'[AMOUNT] * RELATED ( 'discount'[percentage] )
)
If measure =
CostPrice =
Sumx('total', IF (RELATED ( 'discount'[percentage] ) = 0, 'total'[PAMP] , 'total'[AMOUNT] * RELATED ( 'discount'[percentage] )
))
- BartVlek6 years agoHelper II
Yes the tables are joined, and I am creating a column