

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
left align dates
Hello all,
Hopefully there is a solution to this that I have overlooked.
I note that:
A: Qlik Sense automatically left aligns Text and right aligns Dates and Numbers.
B: The reason why Dates are right aligned is because of the Dual function which stores Dates as a text string to be displayed and a number for processing and sorting the order.
I have been able to convert a date to a text so that it Left Aligns using the following function in the script:
Text (Date("Date",'MMMM')) as "Month",
This means that visually, the filter planes all line up as they should as follows:
The problem now is the order is now out of sync as the text is now sorted alphabetically.
How can I arrange the order of the text?
Perhaps add a preceding number or some other character to the text? This preceding number/character would need to remain invisible.
I have tried playing with the Dual function, but when I apply a number to the text, it gets right aligned again.
Many thanks,
Colin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
would you be able to attach the QVF ?
otherwise, try this on the sorting:
=min(Date) ==> ascending
or
=Max(Date) ==> descending


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
go with custom sort with expression.
=match (Month, 'Jan', 'Feb', '....)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Youssef,
Thank you for the reply.
Your reference to Sort directed me to the Sorting Area.
I edited the Filter Pane.
When to Sorting and changed it to "Sort Numerically".
It has now put the Text in the correct order.
I don't understand why this has worked but it has.
So in essence, it is now solved and this is now a solution
Best Regards,
Colin


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chennaiah,
Yes I have just tried your solution and it works as well.
The full expression is:
=match(Month, 'January', 'February','March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')
Thank you,
Colin
