I have a datapage which make about 14 different calculations to get to a list of calculated fields. I am trying to take any row in which there is a "2" and display "Primary" in this row. Each of the calc fields contains the value of blank (perhaps NULL? it is a query that is returning no results), 0, 1 or 2. Below is my case statement that is not playing nice. I appreciate any input.

CASE
WHEN [@calcfield:3]=2 THEN 'PRIMARY'
WHEN [@calcfield:4]=2 THEN 'PRIMARY'
WHEN [@calcfield:5]=2 THEN 'PRIMARY'
WHEN [@calcfield:6]=2 THEN 'PRIMARY'
WHEN [@calcfield:7]=2 THEN 'PRIMARY'
WHEN [@calcfield:8]=2 THEN 'PRIMARY'
WHEN [@calcfield:9]=2 THEN 'PRIMARY'
WHEN [@calcfield:10]=2 THEN 'PRIMARY'
WHEN [@calcfield:11]=2 THEN 'PRIMARY'
WHEN [@calcfield:12]=2 THEN 'PRIMARY'
WHEN [@calcfield:13]=2 THEN 'PRIMARY'
WHEN [@calcfield:14]=2 THEN 'PRIMARY'
WHEN [@calcfield:15]=2 THEN 'PRIMARY'
WHEN [@calcfield:16]=2 THEN 'PRIMARY'
WHEN [@calcfield:17]=2 THEN 'PRIMARY'
ELSE 'NOT'END

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.

## Question

## NickO

I have a datapage which make about 14 different calculations to get to a list of calculated fields. I am trying to take any row in which there is a "2" and display "Primary" in this row. Each of the calc fields contains the value of blank (perhaps NULL? it is a query that is returning no results), 0, 1 or 2. Below is my case statement that is not playing nice. I appreciate any input.

## Link to comment

## Share on other sites

## 2 answers to this question

## Recommended Posts

## 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.