Jump to content
  • 0

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


arsyad

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";"")

Link to comment
Share on other sites

2 answers to this question

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";"")

Link to comment
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/

https://www.w3schools.com/sql/sql_case.asp

 

Link to comment
Share on other sites

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.

Guest
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...
×
×
  • Create New...