Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate total on-the-fly

Hi All,

Attached is a sample file on what I'm trying to achieve.

I can get the total easily by doing a group by aggregation in the script.

I want to get the ratio of sales of Display and Reporting Company by its corresponding Company. Company is not part of the chart dimension. Is there a way to do this total column calculation on the fly as I have other matter for e.g. currency exchange rate to consider.

Thanks! Any input is appreciated.

1 Reply
Not applicable
Author

Hi there,

I think I had a similar problem as yours. Although I`m not sure, please check to see if this would help you calculate the total on the fly:

aggr(sum(Sales),[Company])

If necessary, you can also put in more than one dimension to group by for example:

aggr(sum(Sales),[Company],[ratio])

The function aggr() will then calculate the sum of sales for each individual company, and for each individual ratio, displaying the correct total.

Hope this is what you were looking for.