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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Month to date chart

I need to plot the data in a line chart.

demenssion is dates (1,2,3,4,5.....)

i need to have two lines one reprecent curent months data for the relavent day and other reprecent prv.month data.

ex - i have 100 for may 5th and 400 for june 5th.

so i need to have both the values in same chart which has the days in X-Axis.

I know how to do this with month and years. but can't find a solution for month and days.

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Anuradha,

Go to the variable declaration section and put '=' before the expressions of the variables.

Thanks.

View solution in original post

14 Replies
tresesco
MVP
MVP

PFA.

Hope this helps.

Not applicable

Hi Anu,

U can use the below expression in Expression text box in Sort tab.

SubField(Date1,'-',1)&'-'&SubField(Date1,'-',2)&'-'&SubField(Date1,'-',3)

Please find the below attachment, if u have any concerns, let me know.

Regards,

Kabilan K.

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Hi, Thanks For Your Reply .

I have change my data according to your QVW. I can't see 2 lines.

My expressions are

Sum({<Month={'$(vCurrMonth)'}>}[SALES])

Sum({<Month={'$(vPrevMonth)'}>}[SALES])

There i have eneter a text boxes to chek variables and the two text boxes display correct months,

I also include two expressions in text onbect. but it display the sum of all data and no brake down for month.

Your example is working nice. and i don't think why my one is not working.

finally i have change the $(vCurrMonth) and PUT month names, numbers but still the same result.

Pls help me.

Thanks

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Thanks for you reply, but this is not what i want. tresesco example is good. but it is not working for me

narender123
Specialist
Specialist

Hi,

Show your expression or show sample qvw.

Thanks

anuradhaa
Partner - Creator II
Partner - Creator II
Author

I have added variable vCurrMonth and when i but below expression in text box it shows Jun

=$(vCurrMonth)

Then use below expression to get sum,

=Sum({<T_Month={'$(vPrevMonth)'}>}SALES) and it shows 0

then i change that expression to

=Sum({<T_Month={'Jun'}>}SALES)

Then it shows the value.

tresesco
MVP
MVP

What is the dimension you are using? Can you share a sample file?

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Hi ,

Please chk below attachment

tresesco
MVP
MVP

Are you sure that your variables are right? as you can see, you are talking about vCurrMonth , but while mentioning the expression, you wrote vPrevMonth ?