Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show only first row in the Second Dimension of a Straight Table

I have a straight table with two dimensions.

For each row in the first dimension, I would like to show only the first row in the second dimension.

For instance, let say I have the dimensions ACCOUNT and TRANSACTION, with several TRANSACTIONS per ACCOUNT

ACCOUNT          TRANSACTION         

Acc1                  T1

Acc1                  T2

Acc1                  T3

Acc2                  T5

should be displayed as

ACCOUNT          TRANSACTION         

Acc1                  T1

Acc2                  T5

I want to achieve so using an expression in a calculated dimension or an option for the sheet object

10 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Look at first sorted value function.

Regards

ASHFAQ

Not applicable
Author

thanks a lot for answering!

Could you be more specific? how to tune correctly this option?

Many thanks again

Not applicable
Author

Also is it possible to use it in a calculated dimension ?

its_anandrjs

T:

LOAD * INLINE [

    ACCOUNT, TRANSACTION

    Acc1, T1

    Acc1, T2

    Acc1, T3

    Acc2, T5

];

N:

LOAD

   ACCOUNT, MinString(TRANSACTION) as Min_TRANSACTION

   Resident T

   Group By ACCOUNT;

Not applicable
Author

I Cannot use the script. something similar in a calculated dimension ?

Many thanks

maxgro
MVP
MVP

maybe with dimension limit

yu can hide 3rd column if not needed

1.png

Not applicable
Author

Thanks a lot. It is almost good. The only problem is that not the "first" transaction is selected in the second dimension, but the last(?) I try to use the sort pane option "Sort by Expression", but it is not working. How to?

maxgro
MVP
MVP

use

TRANSACTION as first expression

and sort TRANSACTION (promote it to first field in sort tab)

2 dimensions

1 expression TRANSACTION

mahesh_agrawal
Creator
Creator

Hi,

Test.qvw is for Backend implementation.

Test1.qvw is for Frontend implementation.