Forum Discussion
cocoloco79
Helper III
5 years agoDAX to Show value when 0
Hello.
I'm reaching out becasue I'm stuck with a formula. I like to calculate the qty of corn cobs used for Prepack and Losse products.
Cobs Qty = (Query1[QtyInner]*Query1[QtyPieces])*Query1[Boxes] --- this formula calcualtes the prepacked qty correctly, however it retuns "0" when the product is "Loose". If OtyPieces is "0", I need the formula to look at QtyInner. Can someone help me with this?
cocoloco79 , not very clear.
A new column like
Cobs Qty = if(Query1[QtyPieces] <>0 , (Query1[QtyInner]*Query1[QtyPieces])*Query1[Boxes],(Query1[QtyInner])*Query1[Boxes])
3 Replies
- amitchandak
Super User
cocoloco79 , not very clear.
A new column like
Cobs Qty = if(Query1[QtyPieces] <>0 , (Query1[QtyInner]*Query1[QtyPieces])*Query1[Boxes],(Query1[QtyInner])*Query1[Boxes])
- cocoloco79
Helper III
Thank you very much, spot on!
- manikumar34
Solution Sage
Not clear, but try something like below.
if(Query1[QtyPieces] =0 , Query1[QtyInner],Query1[QtyPieces])
Regards,
Manikumar