Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My formula is like this - SUM({<Weekday={"$(=Weekday(Max(Date)))"}>}Value)
The one in orange are data fields, while the one in blue are Qlik functions. My value field is available in the data for each weekday ( Mon to Sun). I want to pull the value for the Weekday which matches the Weekday of the latest available date in the data.
When i replace my code which is underlined by a name such as 'Monday', then formula given correct output. But the above mentioned isnt working as i have to make it dynamic based on the latest weekday
Can someone help where is the error and how to solve it
Hi Pal25,
Suggestion 1: A thought - cast the max(date) back to a date format, like date(max(date))?
Weekday function is 0 based.
Suggestions 3: I believe if you add “total” as: Weekday(Max(Total Date)) you should get what you specified. I think it’s considering each date individually without it.
Weekday() returns a dual value ie 'Mon' and 0; it does not return 'Monday'
So if your Weekday field has values like 'Monday','Tuesday' then it will NOT match with 'Mon' or 'Tue'
I suggest you recreate your Weekday field or create a new Weekday field using the weekday() function