Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Auto row number for a straight table based on expressions applied

I am trying to create an auto number for my rows under a table using RowNo(), but I am not getting what I want. The original table is only showing the values that match my expressions and what I want is for the RowNo() to generate only for those values that are shown in the table and that match the expression. I want to use the RowNo() as a sort of alert unique number for that data value.

When I place the RowNo() it brings all the values for my data, not only the ones that are true due to the calculations, and it also repeats the number is some instances. Does anybody know how I can generate a true RowNo() for only the rows that are showing in the table due to the expressions I applied? I can provide a detail of the data if needed. Thank you.

7 Replies
settu_periasamy
Master III
Master III

Hi,

Can you provide sample data?

May be try this expression...

=if(not isnull([YourExpression Label Name],RowNo(TOTAL))

sunny_talwar

Would be good to know how many dimensions you have and what expressions do you have in your chart?

HirisH_V7
Master
Master

Hi ,

Post your sample app-Data  or how many dimensions your using ??

-Hirish

HirisH
“Aspire to Inspire before we Expire!”
ramasaisaksoft

Hi Maria,

see the below thread will help to you by using Row no()

Row number in straight table

Not applicable
Author

Thank you to everyone that replied. So I have 2 tables. In two different applications that I want the row number to generate in the same way.

The simplest table has 3 dimensions and  3 expressions (adding one with the Row Number)

The more complicated table has 3 dimensions and 6 expressions (adding one with the Row Number)

What I want is to calculate the column shown in Red in the table below. When I use either the RowNo() or the RowNo(TOTAL) function it brings back all the relationship numbers that do not meet my expressions and gives them a row number. I do not want this. And even when I hide the null value in some rows or use the

=if(not(isnull([Relationship Number])),RowNo(TOTAL)) expression, it generates the number up to 65, where I only want it to be max 19 in this case since only 19 relationship numbers meet my expressions.

The expressions that I have are the following:

The fields you see me using in my expressions where calculated within my script.

For the Relationship Number - I have the RELATIONSHIP_NUMBER field also as a dimension but it is hidden in the straight table. I added it here as an expression as well in order to get the unique count of alerts by relationship number.

(TotalTran > '0' and RISK_RATING = '01' and TotalAmount > BAL_Threshold_LOW, RELATIONSHIP_NUMBER,
IF(TotalTran > '0' and RISK_RATING = '02' and TotalAmount > BAL_Threshold_MED, RELATIONSHIP_NUMBER,
IF(TotalTran > '0' and RISK_RATING = '03' and TotalAmount > BAL_Threshold_HIGH, RELATIONSHIP_NUMBER,
IF(TotalAmount > '1000' and RISK_RATING = '01' and TotalTran >= TRAN_Threshold_LOW, RELATIONSHIP_NUMBER,
IF(TotalAmount > '1000' and RISK_RATING = '02' and TotalTran >= TRAN_Threshold_MED, RELATIONSHIP_NUMBER,
IF(TotalAmount > '1000' and RISK_RATING = '03' and TotalTran >= TRAN_Threshold_HIGH, RELATIONSHIP_NUMBER))))))

For Balance Exception

(TotalTran > '0' and RISK_RATING = '01' and TotalAmount > BAL_Threshold_LOW, 'Exception - Bal',
IF(TotalTran > '0' and RISK_RATING = '02' and TotalAmount > BAL_Threshold_MED, 'Exception - Bal',
IF(TotalTran > '0' and RISK_RATING = '03' and TotalAmount > BAL_Threshold_HIGH, 'Exception - Bal')))

For Tran Exception

(TotalAmount > '1000' and RISK_RATING = '01' and TotalTran >= TRAN_Threshold_LOW, 'Exception - Tran',
IF(TotalAmount > '1000' and RISK_RATING = '02' and TotalTran >= TRAN_Threshold_MED, 'Exception - Tran',
IF(TotalAmount > '1000' and RISK_RATING = '03' and TotalTran >= TRAN_Threshold_HIGH, 'Exception - Tran')))


BankRiskRelationship
  Number
Balance
  Exception
Tran ExceptionUnique IDRowNo(TOTAL)
Alert Totals191410
1LOW123Exception - Bal-12
1LOW234Exception - Bal-27
1LOW345Exception - Bal-312
1LOW489Exception - Bal-413
1LOW552Exception - Bal-514
1MEDIUM678Exception - BalException - Tran619
1MEDIUM789-Exception - Tran724
1MEDIUM899Exception - Bal-825
1MEDIUM911Exception - Bal-926
1MEDIUM1025Exception - Bal-1030
1HIGH1136-Exception - Tran1131
2MEDIUM1285Exception - BalException - Tran1244
2MEDIUM1378Exception - BalException - Tran1347
2MEDIUM1452Exception - Bal-1454
2MEDIUM1589Exception - BalException - Tran1561
2HIGH1696-Exception - Tran1662
2HIGH1778Exception - BalException - Tran1763
2HIGH1823-Exception - Tran1864
2HIGH1911-Exception - Tran1965
Anonymous
Not applicable
Author

hi maria,

Maybe in expression tab Select option expression total instead of max rows under total mode  as per your requirement

settu_periasamy
Master III
Master III

Not sure, how to exclude the rows using the if condition. Normally, it would be,

=Aggr(RowNo(TOTAL),Dim1,Dim2,Dim3)  - in this need to use the column is not null.

I tried, but not able to achieve the result.