Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tomelmslie
Contributor
Contributor

Latest reporting month

Hi,

I am trying to create a field which will allow me to see values in the latest reporting month from my data set.

Is there a standard expression for this? 'ReportingMonth' is my field for reporting months, so I tried to create a dimension 'Max(ReportingMonth)' , but it didn't work. Any ideas?

Thanks, Tom

Labels (1)
5 Replies
pradosh_thakur
Master II
Master II

You should not create a dimension as max(ReportingMonth) but use something similar to beloe

sum({ReportingMonth={"$(=max({1}ReportingMonth))"}>}Sales)
Learning never stops.
emrekaya
Contributor III
Contributor III

You should first convert your date to numerical form. Num(ReportingMonth) and then you can use max(num(ReportingMonth)). If you want, you can convert that data to date again. 

Please let us know.

tomelmslie
Contributor
Contributor
Author

Unfortunately both options result in an 'invalid dimension'. If I create this as a measure however, it gives me the right result in a table. Could I solve my problem using a measure rather than a dimension?
emrekaya
Contributor III
Contributor III

I am not sure if I understand the problem here. I am new to qliksense and it is probably better not to give an exact answer to your question. But I have some applications which I used dates as a dimension.

pradosh_thakur
Master II
Master II

Tom, The expression i gave you is supposed to be a measure. Either use it in a kpi or as you said use it in a table.

Happy learning !!
Learning never stops.