Jump to content
• 0

# function I am trying to build a formula in Caspio that will offer the same results as excel. Below is an example of the formula from excel but I am unable to determine how to correctly write this in Caspio. Below my excel formula is what I am attempting to use in

## Question

IIf([BULAN PK]=1;"I";"")+IIf([BULAN PK]=2;"II";"")+IIf([BULAN PK]=3;"III";"")+IIf([BULAN PK]=4;"IV";"")+IIf([BULAN PK]=5;"V";"")+IIf([BULAN PK]=6;"VI";"")+IIf([BULAN PK]=7;"VII";"")+IIf([BULAN PK]=8;"VIII";"")+IIf([BULAN PK]=9;"IX";"")

## Recommended Posts

• 0

IIf([BULAN PK]=1;"I";"")+IIf([BULAN PK]=2;"II";"")+IIf([BULAN PK]=3;"III";"")+IIf([BULAN PK]=4;"IV";"")+IIf([BULAN PK]=5;"V";"")+IIf([BULAN PK]=6;"VI";"")+IIf([BULAN PK]=7;"VII";"")+IIf([BULAN PK]=8;"VIII";"")+IIf([BULAN PK]=9;"IX";"")

##### Share on other sites

• 0

Hello @arsyad,

In SQL you can use the CASE statement to specify the conditions.
For example:

```CASE
WHEN [BULAN PK] = 1 THEN 'I'
WHEN [BULAN PK] = 2 THEN 'II'
WHEN [BULAN PK] = 3 THEN 'III'
WHEN [BULAN PK] = 4 THEN 'IV'
WHEN [BULAN PK] = 5 THEN 'V'
WHEN [BULAN PK] = 6 THEN 'VI'
WHEN [BULAN PK] = 7 THEN 'VII'
WHEN [BULAN PK] = 8 THEN 'VIII'
WHEN [BULAN PK] = 9 THEN 'IX'
ELSE ''
END```

These articles can be helpful
https://howto.caspio.com/function-reference/

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
• #### Browse

×
• Create New...