Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

need help to display result based on specific category

hi guys,

here is the question,

I have the following data and need the result as per the image attached

the script is as follows

***************************************************************************************************************

/*base data comes from source*/

BASE_DATA:

LOAD*INLINE [

BP     ,     CA     ,     Account_Det_ID

1234     ,     5555     ,     DU

1234     ,     5555     ,    DM

1234     ,     6666     ,     DM

5678     ,     1111     ,     DU

5678     ,     2222     ,     DU

];

WITH_ROWNUM:

NOCONCATENATE LOAD

*,

1 as RowNum

resident BASE_DATA;

drop table BASE_DATA;

FINAL_TABLE:

NOCONCATENATE LOAD

BP,

CA,

Account_Det_ID,

if(BP=peek("BP",-1),peek("RowNum",-1)+1,1)as RowNum

resident WITH_RONUM order by BP,CA,Account_Det_ID;

drop table ITH_ROWNUM;

************************************************************************************************************************

Result that I'm in need of is

based on the every 1st RowNum of a BP the result should be displayed as below

Result.jpg

now, what is that I need to modify or use in the script in order to display the result as above

kindly help me out friends

Regards

Anand

Tags (2)
3 Replies
filosofo
Contributor

Re: need help to display result based on specific category

Hi, You only need to create a straight table and your ready. Look at attached .qvw; includes your script.

Regards, Sander.

Not applicable

Re: need help to display result based on specific category

Hi sander,

the expression shouldn't be hardcoded like this

 

=If(RowNum='1', BP)

it should be versatile and should display the result even if the row num is not 1

kindly help

Thanks ahead

Anand

filosofo
Contributor

Re: need help to display result based on specific category

Hi, you could just add RowNum as dimension and then click on any rownum to reduce the set. Or for instance use a variable to enter a rownum. Or... many ways to do this. Hope this helps.

Regards, Sander

Community Browser