Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have requirement of calculating the percentage difference based on month selection.
I have one date field which contains two years of date 2014,2015 and in each year 12 months data are there and sales measure.
Now at the top of the chart i had placed an month filter. when ever i select a month of March then i need to display the percentage difference like (Current Year Month - Previous Year Month)/(Current Year Month) .
How to do the above calculation in Qlikview. Can someone can help me.
Thank in Advance
Regards,
Venugopal G
Message was edited by: venugopal Gummadi
=(sum({<Date ={">=$(=date(monthstart(max(Date)),'DD-MMM-YYYY'))<=$(=date(max(Date),'DD-MMM-YYYY'))"}, Year=,Month=>} Sales)
-
sum({<Date ={">=$(=date(monthstart(addmonths(max(Date),-1)),'DD-MMM-YYYY'))<=$(=date(monthend(addmonths(max(Date),-1)),'DD-MMM-YYYY')), Year=,Month=>} Sales))
/
sum({<Date ={">=$(=date(monthstart(max(Date)),'DD-MMM-YYYY'))<=$(=date(max(Date),'DD-MMM-YYYY'))"}, Year=,Month=>} Sales
=(sum({<Date ={">=$(=date(monthstart(max(Date)),'DD-MMM-YYYY'))<=$(=date(max(Date),'DD-MMM-YYYY'))"}, Year=,Month=>} Sales)
-
sum({<Date ={">=$(=date(monthstart(addmonths(max(Date),-1)),'DD-MMM-YYYY'))<=$(=date(monthend(addmonths(max(Date),-1)),'DD-MMM-YYYY')), Year=,Month=>} Sales))
/
sum({<Date ={">=$(=date(monthstart(max(Date)),'DD-MMM-YYYY'))<=$(=date(max(Date),'DD-MMM-YYYY'))"}, Year=,Month=>} Sales
Hi Kush,
Thanks for you reply....
The above Expression was executed successfully.
Can you guide me how to apply Expression to the bar chart and Pie chart
Please do the needful.
Regards,
Venugopal G
Thank you Kush,
Expression is working for my data.
Regards,
Venugopal G
awesome, glad to know that