Total Count for number of items based on parent and type

Hi

I am having an accounts lists (A1,A2...A5,B1,B2...B5) with Parent(Accounts) as A,B and parent(parent(Accounts)) as X. Type of accounts are Type A, Type B.

 

If user(A,B,X) selects an account then the number of accounts under the particular user with same type should be display in target.

For example, if User A selects an Account A1 then the target should display as 3 because the number of accounts(A1,A2...A5) under User A having same type(Type A) are 3.

If User X selects an Account A2 then the target should display as 6 because the number of accounts(A1,A2..A5,B1,B2..B5) under User X having same type(Type A) are 6.

 

Please find below ex 

  AccountsParent(Parent(Accounts))Parent (Accounts)Who is working(Formulatted,User)SelectCountTypeTarget
X         
 A        
  A1XAATRUE1Type A3
  A2XAXTRUE1Type A6
  A3XA  1Type A 
  A4XA  1Type B 
  A5XA  1Type B 
          
 B        
  B1XBBTRUE1Type A3
  B2XBXTRUE1Type A6
  B3XB  1Type A 
  B4XB  1Type B 
  B5XB  1Type B 

 

Regards

Shirisha.

 

 

Tagged:

Best Answer

  • mburdak
    Answer ✓

    Hi @1635834 

     

    I have designed the following solution as per my understanding.

     

    First we have the Account Details module:

    mburdak_0-1650543606922.png

     

    And we have the Access Control Module:

    mburdak_1-1650543673803.png

     

    From this we can find out which user has access to which account:

    mburdak_2-1650543731123.png

    Now we can sum these to get number of account at Account Type level for each user:

    mburdak_3-1650543780256.png

    And finally we can bring these back to account level as per their type:

    mburdak_4-1650543846988.png

    This final module can be published as a KPI, and when 'User 1' and 'A1' is selected in the context selectors, it will show that User 1 has access to 3 accounts which are of the same type as account 'A1'.

    mburdak_5-1650544032826.png

     

     

    Hope this helps.

     

    Regards,

    Mandeep Burdak

Answers

  • HI @1635834 

     

    By 'User', do you mean to imply the Users List?

     

    Also, how is the user access to the accounts defined.

     

    Regards,

    Mandeep Burdak.

  • @mburdak 

     

    The associated module is not having Users list as dimension and users is not default it is custom users list in our model.

     

    Selective access is enabled for parent level of accounts(X,A,B from the provided example). There is a module with User list(custom) are mapped with Parent list items.

     

    Regards

    Shirisha.

  • @mburdak 

     

    I am facing one issue here. As per below solution I am getting the number of accounts which are under the particular user and Type. But I need another combination as well i.e., Category.

     

    So in the 4th step i.e., Account Type Count module in your example, I will be including another dimension i.e., Category as well. I have enhanced the logic as [sum:Category] and the logic and everything is working fine but due to 3 dimensions in the module it is occupying lot of space and performance is decreasing.

     

    So, do you have any other way to implement this.

     

    Regards

    Shirisha.