Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Numbers to Text with IF Statement

I am currently using a calculation to determine % of Inventory Remaining.   I would like to use an "IF" Statement to convert this calculation to "Plain Text" - i.e. 100% = "SOLD OUT"   The chall...
  • kevcurtis's avatar
    8 years ago

    Have you tried using SWITCH in a new column or a measure?

     

    [Measure] = your calculation

     

    %toText = SWITCH([Measure], 1, "Sold Out", "")

     

    %toTextNested = 
    SWITCH([Measure],1,"In stock",
    (SWITCH([Measure],0,"Sold out",
    (SWITCH([Measure],.5,"Low","")))))