Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to refer to the rows in a straight table + quartiles

Hi,

I have a straight table with an computed expressions and i have to make the quartiles for each of this expression according the banks (field [banks]).

The table should look like this:

QuartilesROAROE
1Q (for banks)
2Q (for banks)
3Q (for banks)
4Q (for banks)

I have a field [banks], ROA and ROE are computed expressions. How can i refer to the row which contain ROA and ROE? I'm looking for a function which have a similar action as column(), but refers to the rows. I added a dimension which almost do it, but only for one field, with an expression if. How can I do it?

7 Replies
Not applicable
Author

send me sample qvw file

Not applicable
Author

I attached qv file. I want to sort values by banks and make quartiles for them in one table.

Not applicable
Author

I tried to do it by writing a calculated dimension:

=if(FXX00120 <= fractile(TOTAL FXX00120, 0.25), 1,

if(FXX00120 <= fractile(TOTAL FXX00120, 0.5), 2,

if(FXX00120 <= fractile(TOTAL FXX00120, 0.75), 3,

if(FXX00120 <= fractile(TOTAL FXX00120, 1), 4,

))))

But i works only for one expression

buzzy996
Master II
Master II

seems to be still some thing is missgin to undestand this issue!,how u want o define 1Q (for banks),2 Q (for banks)..etc?

if it's based on banks,all abcnk will come under same Q1 or not? pls explain little bit more.

Not applicable
Author

1Q is first quartile. At first I must sort indicators (ROA, ROE) for banks:

e.g.

-0.04%, 0.02%, 0.03%, 0.06%,0.11%, 0.15%,0.27%, 0.3%

n=8

n/4=2

1Q=0.02%

2Q=0.06%

3Q=0.15%

4Q=0.3%

The same for ROE. I need to display this 1Q,2Q,3Q,4Q values for this two indicators in one table.

buzzy996
Master II
Master II

sorry for asking again,how u came to know 1Q=0.02%?

Not applicable
Author

After sorting this already computed values you count, how many values do you have. There are 8 banks, so n=8. Quartiles divide population on a 4 equal subpopulation. So in one subpopulation you have 2 banks. In order to compute quartiles you take a value for 2th, 4th, 6th and 8th bank in a rank. I need to display this values and earlier bolded them.