Forum Discussion

Vindy's avatar
Vindy
Regular Visitor
4 years ago
Solved

if statement in Measure

In red is a measured column which is 

% Scrap = ([Q4QTY minus Q4QTY 2]/[Production plus scrap])
How do I make %Scrap say PURCHASED if the purchased Parts = 2 and Qty Good Production is blank?

 

 

  • Hi Vindy ,

     

    if you are willing  to convert your %Scrap to text,

    Please try and substitute with your columnnames

    VAR _Scrap% = 
    ( your % Scrap calculation ) * 100
    
    RETURN
    
    IF(
    Purchased Parts = 2 && Qty Good Production = BLANK (),
    "PURCHASED",
    
    IF(
    Purchased Parts = 1 && Qty Good Production = BLANK (),
    _Scrap% & "%",
    
    _Scrap% & "%"
    
    
    

     

1 Reply

  • mussaenda's avatar
    mussaenda
    Community Champion

    Hi Vindy ,

     

    if you are willing  to convert your %Scrap to text,

    Please try and substitute with your columnnames

    VAR _Scrap% = 
    ( your % Scrap calculation ) * 100
    
    RETURN
    
    IF(
    Purchased Parts = 2 && Qty Good Production = BLANK (),
    "PURCHASED",
    
    IF(
    Purchased Parts = 1 && Qty Good Production = BLANK (),
    _Scrap% & "%",
    
    _Scrap% & "%"