Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am loading some data from my qvd into a tableBox which shows distinct rows only. I want all the duplicate rows to be displayed. Below are few approaches I tried.
(Drawback: Not a feasible solution as the qvd contains millions of records)
(Drawback: Straight table does not display a horizontal scrollbar. thus , user will not be able to scroll horizontally and check what all columns are available in table.)
Is there another efficient solution to achieve this?
Option 1 is really the only sensible option. Adding a single integer that is sequentially incremented is definitely the most efficient way of getting a unique ID. This allows QlikView to optimize away the symbol table for this field.
If adding one single integer column makes it not feasible I can't understand what would be good. Maybe scrolling through millions of records is not the right way of doing it then. Can you "force" the user to make some minimum selections to reduce the number of rows by an order of magnitude or two? So for example having one or more list boxes with dimensions where you set the ALWAYS ONE SELECTED VALUE restriction should do the trick.
Hi There Pooja N,
Yes, there is another way. You can use the Dual() keyword to achieve what you are trying to do, for example:
T1:
load * inline [
id, month
1, jan
2, jan
3, jan
4, jan
5, jan
6, jan
];
T2:
load
dual(month, id) as themonth
Resident T1;
Create a tablebox with themonth as the only field and it will be repeated 6 times.
Hope that helps.
Kind regards
George
www.qliktastic.com
The only drawback I see is - the size of my presentation layer qvw file increases and it takes a bit more time to reload .
Hi George,
I am not really sure about how can I incorporate the solution you suggested. The field 'id' specified in your example seems to be unique for every record of table 'T1' . I don't have any field that makes every row unique.
Hi,
Create a new filed like below and add it in table box.
LOAD
Rowno() AS SNo,
*
FROM DataSource;
Hope this helps you.
Regards,
jagan.
You could just use the RowNo() function, if you are loading from a QVD, then this would work:
Load
*,
DUAL(RowNo(), Month) as Month
from your.qvd (QVD);
Every field in QlikView has 2 values, a text value and a numeric. The Dual() function lets us set them both explicitly. Adding RowNo() ensures that each field is unique.
If you want to post more of your code, I'd be happy to write something that fits what you have.
Kind regards
George
www.qliktastic.com
Hi Pooja,
Approach one is the better way to handle your problem ...
try like this :
1. Add the ROWNO() function to the file where your presenting the data don't add this column in the QVD
2.Since ROWNO() produce a number , memory allocation will be must efficient
3.In the front end try to show your charts on conditional mode i.e. instead of showing 10 years of data ...have check to select the year so that your chart loading will be really fast