Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In a column of a table if contains both -ve and +ve value how we can put both -ve and +ve value in bar chart.
Sorry Hussain! It's not working too. Please find the error message "SQL error: 'Previous' is not a recognized built-in function name"
Are you using sql server as a backend? qlikview functions will not work under SQL command. you need to read the sql data table using qlikview load and apply the function.
sales_live:
SQL SELECT YEAR, SALES FROM [stk_sales];
sales_master:
load year, sales, sales-previous(sales) as variance resident sales_live;
drop table sales_live;
Hi
Sorry about that, I missed something quite important off that function, use the RangeSum function along with Above function as per something like this:
Sum(SalValue) - RangeSum(Above(Sum(SalValue),1,1)
The values for 1,1 are Offset and RowCount where 1 as an offset means start counting at 1 row above (-1 would mean 1 row below, 0 would mean current row) and the row count is 1 which means count only 1 row, if you wanted to count everything up to current row then replace this with RowNo().
I use this all the time in bar charts.
I tried this on graph, it works
=(Sales) - above(Sales)
Hi
That will work but only if you are analysing pre-aggregated values, if you want to use the Sum of a value minus the sum of a previous value then you're going to have to use the RangeSum function.
Thanks Nigel,
I agreed.
Regards,
Shumail Hussain
Hello Nigel! I tried your method but it is not giving the expected result. I mean it is giving incorrect variance. Please let me know if you have any other solution if you have any.
Can you post an example of your app?
I have attached the screen shot. Please find difference in the value. Variance is the one which is required and Variance-1 is the one which i got after using yours. I will post the application little later.
No attachement is there... can you share us an example?
Regards,
Shumail Hussain