Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get monthly salary and Yearly bonus in same chart?

Hi All,

     I have requirement to show Monthly salary and Yearly bonus in same chart.

     In Y-axis expression is like sum({<AccountDescription={salaries}>}Amount) as Monthly salary,

     and sum({<AccountDescription={'Salary & Other Comp'}>}Amount) as Yearly Bonus.

For better understanding Plz see below image .

salry acct.png

1 Solution

Accepted Solutions
Gysbert_Wassenaar

I should get Blue dot for all month year but red colour dot(Bonus ) only at the end of each year.

Your data says otherwise. If the bonus amount were only available in the last month of the year you would see that reflected in the chart.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

Combine the Year and Month dimensions into one dimension. The best option is to create this field in the script. If that's not an option you can use a calculated dimension: =MyYearField & '/' & MyMonthField


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you ,

Issue is ,Salary is month wise but Bonus is once in a year.

I should get Blue dot for all month year but red colour dot(Bonus ) only at the end of each year.

salry acct.png

Gysbert_Wassenaar

I should get Blue dot for all month year but red colour dot(Bonus ) only at the end of each year.

Your data says otherwise. If the bonus amount were only available in the last month of the year you would see that reflected in the chart.


talk is cheap, supply exceeds demand
MayilVahanan

Hi

May be try like this

You can create a flag for Last Month of every year and use in the "Yearly Bonus" expression.

Ex: = if(Month = 'Dec', 1, 0) as Flag

sum({<AccountDescription={'Salary & Other Comp'}, Flag = {1}>}Amount)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thank you ,

You  valuable answer made me think more about data, let me check once again.

jyothish8807
Master II
Master II

Hi Mahantesh,

PFA.

Hope it works.

Regards

KC

Best Regards,
KC