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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

For each... Next....

Hello,

Is it possible, for the function 'For each'... to use it for expressions within a chart, and if so, how would I go about it?

I.e. for each site do sum(balance) next...

Your help is appreciated!

Kind Regards,
Dayna

2 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

I don't think it is possible.

Any way it would create performance issues. I would rather make adjustments in the script - introduce new flags, etc. to do sum on the charts. If you provide your data model details, we can make some suggestions for you. Other options would be to use <GROUP> with sum or aggr() functions.

Thanks

Dayna
Creator II
Creator II
Author

Hello Rakesh,

Many thanks for the response, currently my data is a combination of two QVD's, to provide a balance field and the site which the balance is related to.

The expression I am currently using within my chart is:


firstsortedvalue(DISTINCT aggr(min({<[BOM Chart - Date] = {"<=$(=date(only(today())+91))>=$(=date(only(today())-91))"}>} [BOM Chart - Balance]),[BOM Chart - Timescale],[BOM Chart - AutoNo]),-[BOM Chart - AutoNo])


If you could advise or need any more information, please let me know!

Kind Regards,
Dayna