cancel
Showing results for 
Search instead for 
Did you mean: 

Cell comparision in WEBI report table

Former Member
0 Kudos

Hello Guys,

How to compare value of each cell in a column of a table?

For example:

SUBJECTSMARKSFLAG
A1121
A2422
A3201
A4303
A530

The FLAG variable works like this.

If Marks[i] > Maraks[i+1] then FLAG=1

If Marks[i] < Maraks[i+1] then FLAG=2

If Marks[i] = Maraks[i+1] then FLAG=3

Need your help here on achieving this. Thanks a lot for your help.

Shreyas

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member210032
Active Participant
0 Kudos

Hi Shreyas,

What is 'i' in the FLAG condition.

Thank you

Mustafa

Former Member
0 Kudos

Hey Mustafa,

Marks[i] is value in cells in Marks column. So iteratively i wrote it as Marks[i].

In simple programming terms:

Marks[0]=12

Marks[1]=42

Marks[2]=20

Marks[3]=30

Marks[4]=30

Thanks

Shreyas

arijit_das
Active Contributor
0 Kudos

Use the formula below:

FLAG =If([MARKS]>RelativeValue([MARKS];([SUBJECTS]);1);1;If([MARKS]<RelativeValue([MARKS];([SUBJECTS]);1);2;If([MARKS]=RelativeValue([MARKS];([SUBJECTS]);1);3)))

Former Member
0 Kudos

Thanks Arijit. Let me try and will get back to you.

Former Member
0 Kudos

It working good..thank you:)

former_member210032
Active Participant
0 Kudos

Hi Shreyas,

What is your exact requirement explain clearly........?

Thank  you

Mustafa

Former Member
0 Kudos

Hey Mustafa,

I need a column called FLAG which shows the values 1/2/3 depending on comparing values of marks[i] row and marks[i+1] row.

Thanks

Shreyas