Discussion Board for collaboration related to Creating Analytics for QlikView.
Hi, i'm facing this problem: i've a bar graph where i'm showing
My customer is asking me to have an action button for switching from sum to avg. No problem i've created a variable vAggr to do it
if(vAggr='sum', sum(sales), if(vAggr='avg', avg(sales))
Then he asked me to cycle on time dimension not with a classic QV symbol but he wants further buttons to set Year, Month,ecc
I tried with a further variable vTime but when i try to use it, it stops calculating avg. I use this expression:
if(vAggr='sum', sum(sales), if(vAggr='avg', sum(sales)/count (distinct $(vTime)))
Where is the problem, i can't see it. Tks
What you have in the variable $(vTime)
I assume vTime like Year, Month based on button selection it will change the Year or Month.
using the Conditional option in expression use like this
vTime = 'Year'
if(vAggr='sum', sum(sales), if(vAggr='avg', sum(sales) / Count (distinct Year)))
vTime = 'Month'
if(vAggr='sum', sum(sales), if(vAggr='avg', sum(sales) / Count (distinct Month)))
Hope its help.
Otherwise provide the sample app for that
I am attaching a file for the same button action, go for it ,
Hope it helps.
Please find attached file, hope it helps you.
I've Year, Month, Week, Fiscal Quarter, Date
Yes, correct for sum or avg but also to cycle on x axis dimension i need furrther buttons
PFA file for solution.