Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am working with a set of data that I want to enforce a specific sort order on, that is nothing to do with the text of the data. This seemed like exactly what the 'dual' data type is there for, so I set up an inline table with the name and value in and loaded the data in as a dual. This worked fine, the text displayed much as it was before, except sorted in the numeric order I had specified. On one list box I had to enforce left alignment as QlikView had decided to align right - but apart from that it was fine.
I also had another document that had the same element, and required the same sort order. I therefore copied the inline load into that document also. However, in this document the dual value started showing as the numeric value rather than the text.
I have checked that the number format is set to mixed wherever the field is referenced, but the system still insists on showing it as numeric.
On the initial document I could replicate the issue by setting the format for the field to Integer, but as soon as I set it back to mixed the field displayed correctly again.
Can anyone suggest how I can force the system to always show the text value rather then the numeric value for a dual data type?
Regards,
Steve
Steve,
Did you ever get a an answer to this question?
Related to this, do you know any way that you can set left aligned as the default for a Dual value like this?
Regards,
Michael
Hi Michael,
When I asked the question (coming on five years ago!) I would have been using QV 8.5. The original question was most likely due to a QV bug as I don't recall seeing it since. It's worth noting that the format for a column is based on the first value QlikView sees in that column as it loads. You can force formats by doing an INLINE load or some such ahead of the rest of your load (remember to drop this dummy data if you do this).
Regarding the alignment, I don't know of any way of defaulting the alignment, and the default is often wrong. For example, Dates always right align by default and should be left. Also, I always prefer column titles for numeric columns to be right aligned (as with the data), also, having values left or right aligning based on type in the same column is seldom right (eg. invoice number 1234 aligning right, but INV00234 aligning left). For that reason, I find that I always go in and manually set the column alignment - and I would recommend this as an approach.
Regards,
Steve
Thanks for the reply Steve.
You have just listed all my gripes regarding the default alignments. I come across all of those regularly.
It does seem that you can set an alignment using the Presentation tab in the Document Properties dialog on a field-by-field basis. I don't think it affects objects you have already created, but does set the default for any new objects.
Indeed - but as you say there is no way you can distinguish between duals and numbers. I'm actually considering aligning everything left by default (to fix the problem of duals) but it would be good if you could do duals differently to numbers. A feature request may be a good idea...