Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a graph similar to the image below:
It's just a Date as a dimension and a sum of orders on that date as an expression. This is perfect, but is there anyway I can have the dimension labels display as something else? The graph will only show the past 7 days and I'd like it to have the day name so 'Thursday, Wednesday' etc. Is there somewhere I can do that? I tried a custom dimension but it didn't work out too well for me.
You can use date(MyDate , 'WWWW') to display the long day names. If you need different names than your systems default use the LongDayNames variable in the script:
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saterday;Sunday';
See attached example.
Try This
weekDay(Datefield)
hope this helps
Where would I try that? If I add it to the dimensions it ruins my graph?
Hi,
You can add fields on your model.
Like :
Calendar:
LOAD
Date,
Month(Date) as Month,
WeekDay(Date) as WeekDay
[...]
Best,
Aurélien
in dimension or in Script;
see the csript example below
see the attched sample file
You can use date(MyDate , 'WWWW') to display the long day names. If you need different names than your systems default use the LongDayNames variable in the script:
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saterday;Sunday';
See attached example.
Thanks, this is what I needed.