Forum Discussion
cocoloco79
5 years agoHelper III
Parameter with condition
Hi everyone I need to add a second parameter which will kick in if (invoiced[ConsigneeName]) is "ABC" to apply a diffrenet price. Can someone assist with this? Much appreciated!!! thank you! ...
- 5 years ago
Hi cocoloco79
Based on your all inputs. Below code would required to get desired output:-
Estimated_market_price = VAR result = IF ( MAX ( Invoiced[Qty Invoiced] ) <> MAX ( Invoiced[Qty Sent] ), IF ( MAX ( Invoiced[Consignee] ) = "Kalfresh", SUM ( Invoiced[Estimated market price] ), SUM ( Invoiced[$/Unit] ) ) ) RETURN IF ( result = 0, 0, result )Output:-
Please let me know if it works for you.
Thanks,
Samarth
Samarth_18
5 years agoCommunity Champion
Hi cocoloco79
Based on your all inputs. Below code would required to get desired output:-
Estimated_market_price =
VAR result =
IF (
MAX ( Invoiced[Qty Invoiced] ) <> MAX ( Invoiced[Qty Sent] ),
IF (
MAX ( Invoiced[Consignee] ) = "Kalfresh",
SUM ( Invoiced[Estimated market price] ),
SUM ( Invoiced[$/Unit] )
)
)
RETURN
IF ( result = 0, 0, result )
Output:-
Please let me know if it works for you.
Thanks,
Samarth
cocoloco79
5 years agoHelper III
Thank you very much, this worked!!!!!