go to post Evgeny Shvarov · Jul 12, 2016 Sorry, Cheng Cheng!Got the idea now: you wanted Sum function for each Product Category, and Avg function for All Products in the same pivot)And this use case of IIF and LEVEL_NUMBER solves the task. Great! Thanks!
go to post Evgeny Shvarov · Jul 12, 2016 Hi, Cheng! Thank you for the explanation! Great use case, btw. Now it's more clear with your initial post. It would be great if you include Level_number in the query too to see what rows has different Level_number. Like this: WITH MEMBER measures.[with avg summary info] AS 'IIF(Product.CurrentMember.Properties("LEVEL_NUMBER") = 1, AVG(Product.[Product Category].Members, measures.[amount sold]), SUM(Product.[Product Category].Members, measures.[amount sold]))' MEMBER measures.[total count] AS 'SUM(Product.[Product Category].Members)' SELECT {Product.[Product Category].Members, [Product].[All Product]} ON 1, {Product.CurrentMember.Properties("LEVEL_NUMBER"),measures.[with avg summary info],measures.[total count]} ON 0 FROM Holefoods I suppose 'All Product' level should have the Sum of all Product levels. But in your example 'All product' lesser than 'Snack' for example.
go to post Evgeny Shvarov · Jul 11, 2016 One more hint from Russian forum:%GCMP - Compares two globals in the same or different namespace.
go to post Evgeny Shvarov · Jul 11, 2016 HI, Cheng! Thanks, great example!What is the "LEVEL_NUMBER"? Is it a kind of internal property?
go to post Evgeny Shvarov · Jul 11, 2016 That depends on property collation. For EXACT/ TRUNCATE/SQLSTRING collation, yes "val" should exactly match the value of the property (compared part of the value), case sensitive. For SQLUPPER - no.Should I see this collation setting in Index or in property definition? And what is the default setting - SQLUPPER?
go to post Evgeny Shvarov · Jul 7, 2016 Thank you, Benjamin!It is still so much to work to make email notifications really helpful.We'll try to fix the issues in some next releases.
go to post Evgeny Shvarov · Jul 7, 2016 Thank you, Eduard. We plan to add Member Collaboration page with posts and comments and I think this page will be changed to the link of Member's collaboration of yourself and will go with pagination.So it will be fixed in some next releases.
go to post Evgeny Shvarov · Jul 6, 2016 ClassMethod PropertyGetStored(id) For datatype properties this method returns their logical value, for object properties, it returns the id. It’s a wrapped global reference to the class data global and the fastest way to retrieve the singular property value. This method is only available for stored properties. Eduard, you say it's the fastest way to take the value. Did you measure it?
go to post Evgeny Shvarov · Jul 6, 2016 The interesting question would be - why not traverse index global to get id instead of using SQL?Really good question...Another question what is the sense to check "val" for IS NULL for Unique Index?So, "val" should exactly match the value of property, case sensitive?
go to post Evgeny Shvarov · Jul 6, 2016 Edward, thank you for the very useful article! As addition to your article it would be great to add a demo class with direct examples of all the features. Regarding this method: ClassMethod IndexOpen(val, concurrency, sc As %Status) "val" should be in Upper case I suppose?
go to post Evgeny Shvarov · Jun 30, 2016 Thank you John, some of your points here really make sense. We'll think about it.You can be sure, that all posts in InterSystems Data Platform Blog were reviewed by InterSystems engineers team and are promoted by InterSystems product managers.Speaking about the high standard of technical and professional competence of engineers here in the community, I think votes, views and comments for the posts and answers can indicate the competence. I'm quite sure that there are a lot of engineers in InterSystems Developer Community (DC) who has high competence in InterSystems technology.We have plans to introduce some signs/badges here on DC, which will indicate competence in different parts of InterSystems technology and products upon their contribution to Developer Community.
go to post Evgeny Shvarov · Jun 28, 2016 Nice snippet, Eduard!I wonder what is the reason to calculate Package length?
go to post Evgeny Shvarov · Jun 23, 2016 You can buy MUMPS DBMS book by Evgeniy Karataev on this site if you want.Also there is another online book about Caché in Russian: "Модели и смыслы в Caché и Oracle" by Nikolay Bessarabov.And last year there were new book about InterSystems Caché on Ukranian: see the TOC by Irene Mikhailova and Vladimir Gaidarzhi
go to post Evgeny Shvarov · Jun 22, 2016 Hi, Rob! It would be better if you post the whole text of the solution here in Developer Community, instead of supplying the link only. I think this is the better approach to engage the discussion.
go to post Evgeny Shvarov · Jun 21, 2016 Copy-paste the current index from the previous post and add a new link to the previous post?