Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Afternoon all, hope you're well.
So I have a dashboard showing client name, with revenue amounts, plus hours.
I've added a slider based on a min variable, so colleagues can select to remove clients less than a certain total.
For example, in the attached I have Whisper Power showing 349.50.
So when you move the slider to along to a minimum of 1000, this line should disappear.
But for some reason, even though the revenue goes to zero, the hours then change to say -1.00?
Any help, would be much appreciated.
It's a rounding topic because your result isn't 5,000 else 4,999.9....:
but by including a roundig like the following it worked:
sum({<Client_Name={"=round(Sum(Revenue))>=$(min)"}>} Revenue)
More to this behaviour could you find here: Rounding Errors.
- Marcus
I think your second expression should be look like:
sum({<Client_Name={"=Sum(Revenue)>=$(min)"}>} Worked_Hours)
- Marcus
It shows -1 because your true condition is this
if(sum({<Client_Name={"=Sum(Revenue)>=$(min)"}>} Revenue) = 0,
sum(Worked_Hours)=0,
sum(Worked_Hours))
and for this particular client Sum(Worked_Hours) = 0... which is true and true in QlikView is -1. What would you like to see?
Just use this for hours expression:
if(sum({<Client_Name={"=Sum(Revenue)>=$(min)"}>} Revenue) = 0,
0,
sum(Worked_Hours))
From one Marcus to another, good name
Many thanks, that was a quick and easy solution it seemed.
I have one concern, using this way that i've noticed.
From the attached qvd again, note i have this filtered on a particular client at an amount of 5,000
So if you move the slider along, from 4,000 to 5,000 this should remain.
But for some reason, it disappears!
Any idea, as it seems to do this for a handful of clients?
Nice one
It's a rounding topic because your result isn't 5,000 else 4,999.9....:
but by including a roundig like the following it worked:
sum({<Client_Name={"=round(Sum(Revenue))>=$(min)"}>} Revenue)
More to this behaviour could you find here: Rounding Errors.
- Marcus
of course rounding
excellent, now this slider is working like a dream.
Many thanks pal, exactly what I required