Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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.
qliklearnervir
New Contributor III

show 1:M data in qlikview straight table

Hi,

I have to show my data as given below:

ID          Booking                   Villa Number

1           BO!                               V01

2           B02                               v03

i have to show this data in straight table but the issue is that .......

for example ID 1 have booked 2 villa but we can only show 1 villa number in the field.

in my case data is coming as blank........................i have some other record where 1 ID have booked more than 5 VIlla ...kindly suggest .

AND WE DONT WANT DUPLICATE DATA

but my major goal is to pick idS BUT vILLA NUMBER SHOULD NOT BE NULL ...

3 Replies
MVP
MVP

Re: show 1:M data in qlikview straight table

Use aggregation functions in your expression, for Villa Number maybe Concat():

Dimensions:

ID

Booking

Expression:

=Concat(DISTINCT [Villa Number], ', ')

Use Aggregation Functions!

asgardd2
Contributor III

Re: show 1:M data in qlikview straight table

FOR NOT SHOW DUPLICATE - Use Concat() function in script (table 1 in attachment), and you can use "Table Box" object in dashboard.

FOR SHOW DUPLICATE  - You can add a new field in data model, for example "RowNumber". And add this field for a  hidden field in straight table. (table 2 in attachment)

See  attachemnt.

Re: show 1:M data in qlikview straight table

Or use a pivot table. One of the nice things about a pivot table in QlikView is that you can make it to look like a straight table without ever repeating dimension values.

Peter

Community Browser