Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate Yield Per Month

Hi All,

I want to calculate the Yield Per Month i,e If I have selected 3 months it should show the average of 3 months(total sales of 3 months/3). If nothing has been selected it should show average of 12 months(total sales from jan-dec/12). Anyone knows how to do that.

Total column should be at last after December column or if I select 3 months then total column should come after the 3rd month.

This is how the report is without total column.

error loading image

3 Replies
Not applicable
Author

Hi,

I thought about two ways how to add this additional (Total / Average) column at the end of report.

1-method. You need to load one additional table. But in this way, you can add more than one column (for egxample Total, Average,......)

2-method. It is simplier way. You need to mark "Show Partial Sums" and use SecondaryDimensionality() in the expression. But in this way, you can add only one column.

Look at the application attached to get more detail explanation.

Not applicable
Author

Hi Milda,

Many thanks again for your help.

When I copy and pasted "2 Method" into my application it is not showing up the average column itself. May I know what has to done so that I can see average column as well.

Not applicable
Author

Hi Milda,

I got to know what mistake I was doing. I did not added MonthNum in script that's the reason it is not showing the average.

Many thanks milda! You have done a wonderful job.