How to create report based on Hierarchy in Salesforce - salesforce

I want to create report based on user that roll up to certain role for opportunity.
For example below is reporting hierarchy. All revenue is rolling to X. How can I create report so I can see revenue of X = A+B+C+D+Y+Z where A,B,C,D,Y,Z are opportunity owner and revenue rolling to X.
X > A,B,C,D and
B > Y,Z

Related

Salesforce Report on Users

im creating a salesforce report on users to get the total number of users by profile that have not logged in since 1 month.
Report example
The Profile and Type of license is fields on the User object.
I'm trying to make a formula to get the total number of users that have not loged in for more than a month per profile. The example can be seen in the fourth column in the excel.
I'm trying to do a summary formula column, but i'm having difficulties writing the proper formula

SSAS OLAP Cube: Row level security with Cube Roles

I got a multidimensional OLAP-Cube that attracts my MS SQL Server Database. By now, there was no need for row level security.
Now, we would like to grant access to different sales representatives with Excel-Sheets that have a Live-conneciton to Analysis Services - so every salesman could evaluate the revenues in his sales territory.
This is my data example:
Product table
Customer table
I build a role to restrict the access for the first salesman by customizing the access to dimension data:
new role in my cube
Then I tested my new role and got the following result:
result of product table after restriction
result of customer table after restriction
The restricted role still can see the whole data of the product table and the total amount of the customer table, although the totals are disabled:
disabled totals in Cube
Does anyone one my mistake I did when setting up the new role?
The result, I would like to see after restriction should be this way:
desired result
I hope that someone can help me despite the small amount of information.
Thank you so much!
I believe you can achieve this if you tick "Enable Visual Totals" at the bottom of the popup:

Sales Person (Regional Manager, Zonal manager, Country Head) linking to Fact table

I have a small data warehouse for Sales. Here i have Fact Table for Sales Invoices and Dimensions like customer, Date Time, Sales Geo, Product Code.
Fact Table: Sales - >
Invoice Date, Customer code, Product Code, Sales Geo Code, Billing qty, Amount, Tax, Total Amount
For Sales Geo dimension - >
Sales Geo Code, City Name, Regional Code, Zone Code, Regional Manager Code, Zonal Manager code
I have confusion in how to link my sales persons like Regional Manager and Zonal Managers etc.
Regional Manager is leading one region of multiple cities,
zonal manager is leading multiple region.
Sometimes we change the regional area or zonal area, they get promoted, they left etc.
How to create dimension and link sales team with Sales Fact to get correct Sales report.
regards
there are a few options I can think of:
Denormalise the Regional and Zonal Manager information into your Sales Geo Dimension
Create a hierarchical Manager dimension keyed on Regional Manager and including their zonal manager details
Create a Person Dim and associate it twice to the Fact - once in the role of Regional Manager and once in the Role of Zonal Manager
If you will never want to link Manager information to a fact except in the context of the Sales Geo then option 1 probably makes more sense - as you have fewer potential joins in queries using this fact table.
Option 2 is more flexible as you can associate manager information to a fact without also using the Sales Geo
Option 3 is the most flexible but also likely to give the worst query performance (for any query that needs both types of manager) and also the only link between Regional and Zonal managers is via the Fact; there is no hierarchical information held in the Dimensions. Therefore option 3 is the one I would be least likely to choose
Denormalize the Regional Manager Code and Zonal Manager code in your fact table.
So basically you will store in each fact row along with the Sales Geo Code also the current assignment of the two manager roles at the time of the sales (more precise at the time of the loading the record).
This model allows both types of the reports using
managers assigned at the transaction time (direct from the fact table) and
current managers (join from the fact table to Sales Geo dimension to get the code of the both managers)
Now your setup allows only the second type of the reporting, which could be suboptimal in case that the managers are frequently re-assigned.
If you prefer not to denormalize the fact table you can always switch the Sales Geo dimension to SCD type 2 which will introduce a historical view on the dimension and the assignment of the managers.
You'll have to join not only with the Sales Geo Code from the fact table to the Sales Geo dimension but also considering the transaction date...
Invoice_Date between sales_geo.validfrom_date and sales_geo.validto_date
... to get the managers assigned at the time of the transaction.
The decision has a typical tradeoff between storage plus maintaining the consistency and more complex joins plus maintaing the dimension history on the other side.

Accounting database design question "accounts" and "transactions"

Option 1) user can have multiple "accounts" (eg payment, deposits, withdraws etc)
Option 2) user can only 1 single account, and transaction has types (payment, deposit, withdraw)
Both option will work just fine! They both can produce the same result! However option 1 uses more resources, but it's more flexible, option 1 is not flexible but uses less resources!
What is the question ?
Option 1 is a piece of garbage, that no accountant can use, and no auditor will pass. payment, deposits, withdraws eta re transactions, not "accounts". So what if it uses less resources. SO do cave men.
Option 2 starts to look like an accounting system, with (a) accounts and (b) transactions against accounts, as expected in most developed countries.
So there is no choice.
Start from a journal table, that link to a chart of accounts table. In your journal table is where you will store fieldnames for transaction date, account code, description, amount. chart of account table is where you will store fieldnames like account code, account type (balance sheet or profit and loss),account status (active or inactive). For greater details on the accounting database schema, download derek liew's book on accounting database design.

Database designing help for billing system

I am developing a Electronic Bill Payment System for a bank which has more than 100 customers subscribing for Electronic Bill Payment.
I have a table in which I am creating profile for customer like the following.
Customer Table
Customer_ID (Primary key)
Customer_Name
Address
Phone
Bill_Master
Customer_ID
Enrollment_Date
UtilityCompany_ID
Bill_Generation_Date (lets say 18th of every month)
Bill_Due_Date (lets say 27th of every month)
Our_CutOff_Date (when the bank will generate the bill for payment)
I have created the customer along with clue that which utility company's bill generates on which date and what will be the due date of EVERY MONTH.
I want to create an interface where the user will see the entries of all the customers whoz date is due for bill generation and after that user will click on the particular entry and generate the bill manually by entering the amount and other details so for this I am clueless how to find out which customer's utility company bill is due for generation..
Any help how should I design it and query of it? or would be a automatic procedure like job or something which will do it.
thanks
Well if its a query you need to generate bills that are due 27th of every month and also find the customer's utility company, then you can try this -
SELECT A.Customer_Name, B.UtilityCompany_ID FROM
Customer A inner join Bill_Master B on A.Customer_ID = B.Customer_ID
WHERE Bill_Due_Date BETWEEN GETDATE() AND DATEADD(MONTH,-1,GETDATE())

Resources