Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 qlikwiz123
		
			qlikwiz123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I had a requirement where I need to show Month over Month Difference when the user hovers over a month in my line chart.
This was answered here :
But now, the user also wants to see Year over Year difference along with the Month over Month. When I changed Month fields used in the calculation with year-month, it did not work and shows the same values as Month over Month.
MoM Difference : count({<Month>}distinct [Customer ID]) - Above(count({<Month>}distinct [Customer ID]), 1)
Tried Year over Year difference: count({<Year>}distinct [Customer ID]) - Above(count({<Year>}distinct [Customer ID]), 1)
Both give MoM but not Year over Year.
 Rohan
		
			Rohan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You will have to create a cumulative sum column in the back end data model or use Rangesum instead of only sum. Because the values will be aggregated based on the Month level, Even if you put Year in your set, it will only show that Month's value.
Hope this pushes you to your required output, Kindly let me know.
Thanks & Regards,
Rohan.
 qlikwiz123
		
			qlikwiz123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi @Rohan
Not sure how that works since mine is a count and RangeSum is for Sum. And looking at the backend data model, again, there is no appropriate function to calculate Y0Y Difference. Kindly suggest a calculation that can be used on either front end or backend
 Rohan
		
			Rohan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Please check nested aggregation, for eg: rangesum(aggr(count(),Month)). This will help you cumulate the monthly values.
Thanks & Regards,
Rohan.
 qlikwiz123
		
			qlikwiz123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Tried this and is not working. Giving me large incorrect numbers.
