Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to create a custom dimension with valueloop. This dimension is:
=ValueLoop(today()-7,today(),1)
This gives the 7 last days in number format.
But I need to edit the number format of this dimension so it is a date (DD/MM/YYYY).
I have allready tried =Date(ValueLoop(today()-7,today(),1), 'DD/MM/YYYY') and it doesn't work.
Thanks
Hi Lluis,
This is a workaround that might work for you:
Add the expression shown in the second column:
=ValueLoop(today()-7,today()) | Date(ValueLoop(today()-7,today())) |
---|---|
43017 | 09/10/2017 |
43018 | 10/10/2017 |
43019 | 11/10/2017 |
43020 | 12/10/2017 |
43021 | 13/10/2017 |
43022 | 14/10/2017 |
43023 | 15/10/2017 |
43024 | 16/10/2017 |
then in the presentation tab hide the first column
Date(ValueLoop(today()-7,today())) |
---|
09/10/2017 |
10/10/2017 |
11/10/2017 |
12/10/2017 |
13/10/2017 |
14/10/2017 |
15/10/2017 |
16/10/2017 |
Good luck
Andrew
Hi Lluis,
This is a workaround that might work for you:
Add the expression shown in the second column:
=ValueLoop(today()-7,today()) | Date(ValueLoop(today()-7,today())) |
---|---|
43017 | 09/10/2017 |
43018 | 10/10/2017 |
43019 | 11/10/2017 |
43020 | 12/10/2017 |
43021 | 13/10/2017 |
43022 | 14/10/2017 |
43023 | 15/10/2017 |
43024 | 16/10/2017 |
then in the presentation tab hide the first column
Date(ValueLoop(today()-7,today())) |
---|
09/10/2017 |
10/10/2017 |
11/10/2017 |
12/10/2017 |
13/10/2017 |
14/10/2017 |
15/10/2017 |
16/10/2017 |
Good luck
Andrew
Are you expecting this in Filter Pane?
Andrew, Is there anyway in listbox?
Hi Anil,
You could try this in a listbox:
=Aggr(if(Date > Today()-7 ,Date),Date)
If the Date field belonged to a master calendar with no gaps up to today's date this might give the result we're looking for.
Cheers
Andrew
If you notice, They are using ValueLoop() with Today() function. That mean i believe we are not having Date field currently, Can this achievable?
Hi Anil,
I couldn't find a way to use ValueLoop in a calculated dimension to return the text date I'm afraid. If the poster does not have a date field in his DM then I don't know what purpose a listbox returning a date would serve.
Kind regards
Andrew
I even tried possible ways like Variable and Floor() with Date() format. No luck, Let them reply marcus_sommer stalwar1 marcowedel +swuehl
Eagerly waiting for this, If we could do in Qlik
AFAIK there is no way to format a valueloop() within a calculated dimension. But in this case such a field could be easily created within the script with something:
load date(today()-7+recno()-1) as SpecialDate autogenerate 7;
- Marcus
Hi,
depending on your chart type you might be able to use a continuous dimension axis formatted as date:
hope this helps
regards
Marco