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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
somenathroy
Creator III
Creator III

Aggr within set analysis

Dear All,

I have some plants taking products from factories. Factories have different production slots(buck) for producing products. Now I have to show in a chart

Plant,Factory, product and production value of max buck/slot.

I am using Aggr(Max(buck),Factory,product) in a set analysis, but it does not work.

Please find the attached qvw file that describes the problem.

Any help would be highly appreceated.

Thanks & Regards,

Som

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try FirstSortedValue(prod_val,-buck). This will work as long as there's only one maximum buck value per plant-factory-product combination.


talk is cheap, supply exceeds demand
somenathroy
Creator III
Creator III
Author

Thanks for your reply.

In our requirement, each factory can have multiple buck/slots(e.g 1,2,3,4,..,n) for production. Plants take products from Factories. Thus we can say  plant-factory-product combination have multiple bucks.

The attached image shows the table structure. 

table_structure.png

keyprod : factory + product

keyfact : plant + product

Pls suggest if you think any better table model.

Regards,

Som

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You could do some calculations in the script to find the max prod_val of the max buck. See attached qvw.


talk is cheap, supply exceeds demand
somenathroy
Creator III
Creator III
Author

Thanks for your solution. But still I am facing the problem if I have to show :

production(max(buck)) ,  production(max(buck) - 1) and production(max(buck) - 2).

Actually in our real scenario script level calculation would not be acceptable as script level max prod_val calculation grouping over lots of dimensions would be very difficult (in terms of time and also expression writting).

Regards,

Som