Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I am very new to qlikview and I've been trying to solve this problem for a while now.
I found a lot of answers on the forum, but none that could help me (probably because I'm still fairly new).
I have a document with colums year (f.e. 2016) and month (f.e. Jan).
Now I'm trying to get an expression that offers me the sum of another column for the most recent month.
Found a lot of expressions on the forum, but they don't seem to help, maybe I made a mistake in my script or with formatting?
Could someone please provide me of an adequate answer?
(I'm sorry if I didn't post in the right section or in the right way, as I said I'm really new to Qlikview).
Thanks in advance!
In addition, one of the expressions I've already tried:
=num(sum({<Year={$(=year(today()))},Month={'$(=upper(Month(today())))'}>}[001 - 007]),'€ ###.###.###,##0')
Is there a sample you can share? Would be good to know how the data is structured and where exactly are you trying to use it.
Thank you for your response, but I've actually found it with a bit of help. Might some people encounter the same problem they will benefit of my solution:
Most recent month:
=sum({$<DateAB={"$(=max(DateAB))"}>}[FIELD])
Previous month:
=sum( { < DateAB= {$(=Date(max(DateAB)-1,'YYYYMM'))} > } [FIELD] )
DateAB being structured as followed: Date(DateAB,'MMM-YYYY') as DateAB,
Have a nice day!
Make sure that Your month field is calculated using Month function
=Sum({<YourYearField = {"$(=max(YourYearField))"}, YourMonthField ={"$(=max(YourMonthField))"}>}Sales)