Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i'm facing this problem: i've a bar graph where i'm showing
sum(sales)
count(customers)
sum(goodsdelivered)
etc.
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
Hi,
What you have in the variable $(vTime)
Hi,
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
Regards,
Hii Amuthabharati,
I am attaching a file for the same button action, go for it ,
Hope it helps.
Hi,
Please find attached file, hope it helps you.
Regards,
Jagan.
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
Hi,
PFA file for solution.
Regards,
Jagan.