Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set expression for current selected month to current month line chart

I am using line chart

dimension : month

expression : sum(TurnOver)

If user select a month in selection box, I want to get the data from the user selected month to current month

How can I achieve using set analysis? can you guys give some suggestions please?

5 Replies
MK_QSL
MVP
MVP

SUM({$<Month = {'>=$(=Max(Month))<=$(=Month(Today()))'}>}TurnOver)

or

SUM({$<Month = {'>=$(=Max(Month))<=$(=NUM(Month(Today())))'}>}TurnOver)

Anonymous
Not applicable
Author

See if this is what you need

Not applicable
Author

While applying same SET expression as you mentioned, I am getting No data to display error.

Can you please help me on this??

PrashantSangle

Hi,

You have to do lots of changes.

1: Your Set Analysis Syntax was wrong.

Please find attached file for your reference.

It might help you


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this script

Data:

LOAD * ,

Date(Date#(Month &' '&Year,'MMM YYYY')) as Date

INLINE [

    Year, Month, turnover

    2013, Jan, 100

    2013, Feb, 120

    2013, Mar, 152

    2013, Apr, 654

    2013, May, 254

    2013, Jun, 345

    2013, Jul, 0646

    2013, Aug, 545

    2013, Sep, 4123

    2013, Oct, 446

    2013, Nov, 8984

    2013, Dec, 65456

    2014, Jan, 64646

    2014, Feb, 65456

    2014, Mar, 465

    2014, Apr, 8789

    2014, May, 656

    2014, Jun, 987

    2014, Jul, 456

    2014, Aug, 989

    2014, Sep, 4966

];

Try this expression

=sum({<Date={">=$(=Date(Max(Date)))<=$(=Today())"},Year=,Month=>} turnover)

Hope this helps you.

Regards,

Jagan.