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: 
Not applicable

Month Year in Expression

I want to show only a specifc Month year in an expression based on todays date.  So if today date is 03/07/2013, I want the expression to show on Mar 2013 data.  Below works

Sum({<CalendarWrittenYear = {2013}>} Subtotal)

But I need something like

Sum({<CalendarMonthandYear= {Today}>} Subtotal)

So the CalendatMonthandYear is Mar 2013, I need to convert today into Mar 2013.

Help!!!





5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

=Sum({<CalendatMonthandYear={"=$(=Month(Today()) & ' '&Year(Today())"} >} Subtotal)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Does not want to work, the expression says it is OK, but I get no data.

Lance H. James, CPA

Director of Finance

The Aspen Brands Company

Kate Aspen · Baby Aspen

678.282.0053 x 777

<http://www.theaspenbrands.com/>

<http://www.kateaspen.com/>

<http://www.babyaspen.com/>

Not applicable
Author

How is the field CalendarMonthandYear formatted in your data? I guess it can be a little different that jagan mohan assumed (e.g. 'March 2013')

Not applicable
Author

I am usind the calendar app to help with the dates, the dates are first 3 letter of the month, followed by space then year.  So 03/04/2014 would be "Mar 2013"

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try to create MonthYear as follows.

Monthname(Date) as CalendarMonthandYear

Then you can use below expression in chart to get the desired result.

Sum({<CalendarMonthandYear= {"$(=monthname(Today()))"}>} Subtotal)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!