Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to suppress a value in a chart.
When i use the "IF" condition in the dimension expression ... it aggregates everything.
I do not want to change calculations, just want to suppress a value entirely from the dimension
If() works fine for me in a calculated dimension.
=if(Place<>'SFO',Place)
Then suppress null values for the dimension. NYC stays 24, and SFO goes away.
The solution from elvisleonm may perform better in a real application with real data, though, so is probably the solution I'd use in practice. I just wanted to point out that if() in a dimension works just fine.
LOAD Place,
if(Places <> 'SFO', Places) as Places1,
Sales
FROM
(biff, embedded labels, table is Sheet1$);
If() works fine for me in a calculated dimension.
=if(Place<>'SFO',Place)
Then suppress null values for the dimension. NYC stays 24, and SFO goes away.
The solution from elvisleonm may perform better in a real application with real data, though, so is probably the solution I'd use in practice. I just wanted to point out that if() in a dimension works just fine.
In term of performance, yes, I do believe elvisleonm's way is the best.
But in term of flexibility, I do like John's.
Most of the time, report developer may be business users. Filtered the SFO out using scripts may need a bunch of change requests to change the scripts if users want SFO back.
I suppose it's a matter of how QlikView is developed in your company. In ours, 99% of charts are developed by IT professionals who have access to and understanding of both the script and the objects. So I tend to think of script and object solutions as being very interchangeable. That certainly won't be the case for many shops. Even if the business users aren't the ones building reports, some shops split responsibility for script and objects across different people or different groups. That can at least make it inconvenient to get script changes as a chart developer, particularly for something as simple as this, where the script maintainer might not want to be bothered, or might disagree that a script solution is better.
Options are good.
Cheers Guys !