Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fields of Date are not sorted properly in QV model

Hi,

I have QV model which has the following fields  of Dates:

Day(VWDATE) as Day,
Date(floor(VWDATE)) as Date,
Date((floor(VWDATE)), 'DD/MM/YYYY') AS DateField

So when the model is loaded and I present each of the files in the list boxes I see that only Day field is sorted properly, whether Date sorted in descending order and DateField is not sorted at all.

Please see print screen attached,

I have to say that this phenomenon is new to me as in all models all Dates fields appear in ascending order without any manipulation from my side.

Please help.

4 Replies
marcus_sommer

Have you tried to enable a numeric sorting for this field?

- Marcus

Not applicable
Author

Hi Marcus,

I tried to do :

Load * resident Fact order by Date asc;

It ran successfully , but without impact on sorting.

This is very strange, agree with you.

tresesco
MVP
MVP

Could you post your sample qvw that demonstrates the issue?

marcus_sommer

Normally it should work with your method in both order per load-order and in a numeric-order then date() creates a dual-field even if the formattings is different to the default-format. But you could do it manually, too with:

dual(Date(floor(VWDATE), 'DD/MM/YYYY'), num(floor(VWDATE))) AS DateField

- Marcus