Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the following Expression, the expression is Correct, it returns Mon, how can I get it to return Monday
FirstSortedValue(Weekday, -Aggr(Sum({<TrxType = {'R'},ActionID = {'RECEIPTS'}>}[Act-Storage]) ,Date,Weekday))
So values in the field Weekday are stored as Mon, Tue , Wed?
Then you will have to use Pick (Match
Pick(Match(
FirstSortedValue(Weekday, -Aggr(Sum({<TrxType = {'R'},ActionID = {'RECEIPTS'}>}[Act-Storage]) ,Date,Weekday))
,'Mon','Tue','Wed','Thur','Fri','Sat','Sun')
,'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday')
or Add a new field that has the full names for Weekday!
So values in the field Weekday are stored as Mon, Tue , Wed?
Then you will have to use Pick (Match
Pick(Match(
FirstSortedValue(Weekday, -Aggr(Sum({<TrxType = {'R'},ActionID = {'RECEIPTS'}>}[Act-Storage]) ,Date,Weekday))
,'Mon','Tue','Wed','Thur','Fri','Sat','Sun')
,'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday')
or Add a new field that has the full names for Weekday!
I thought I could do it like this
WEEKDAY(
FirstSortedValue(Weekday, -Aggr(Sum({<TrxType = {'R'},ActionID = {'RECEIPTS'}>}[Act-Storage]) ,Date,Weekday))
,'dddd')
but Pick Match will do
Thanks
Well you can actually do that by changing the below variable
From
SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';
To
SET DayNames='Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday';
and change the Weekday field to be a dual field example
dual(Weekday,Match(Weekday,'Sun','Mon','Tue','Wed','Thu','Fri','Sat')) as Weekday