I have two tables:
First table contains sales pipeline information for accounts (contains pipeline ID, accountID, and pipeline value). Each account IDs have multiple pipeline ID
Second table includes the number of employees per account.
I included these tables to powerpivot, and I created relationship based on account ID.
I would like to create pivot that tells by Number of employees & Pipeline value by account ID and PipeID.
However, when implemented, it repeates all pipeID for each account. Even those pipeIDs which are not related to the account.
http://i.stack.imgur.com/WY1Ga.png
Could someone point me to a right direction to how I tweak the pivot to show only relevant pipeID?
I would appreciate any help you could provide...
thank you!
The numbers repeat in your pivot table because Number of Employees is not related to Pipeline ID. This is Excel's default reaction to missing relationships. To get rid of the repeating numbers and keep this pivot table as is you need to find a way to relate number of employees to a pipeline ID.
If I were modeling this, I would have a separate table that is just distinct Account IDs, to make it it's own dimension. Then have your two tables you mentioned in the question.
If you were simply writing a query against this data, how you would connect pipeline ID to number of employees? To which pipeline should an employee be attached ? If there is a way to do this manually/in a query, adjust your two tables to both include the fields on which you would join. I don't think you would be able to relate Number of Employees to Pipeline ID, so I would remove Pipeline ID from the pivot table. Then the numbers should be correct. You would want to create another pivot to show pipeline by pipeline ID per account.
Related
I'm having a problem while building this sheet and i'm not being able to find a solution.
The problem goes like this:
This is a marketing agency that wants to build quotes for their clients in a more automated and simpler way they do today.
There is a master table that the user must put all products they have to offer and their prices
from this master table, I've created 5 other tables with power query, So they have an user interface to fill the number of products and price adjustments they want to quote. Also some products price depends on the price and quantity of other products. that's why I needed to separate it.
Now I need to bring them back together so I can use it as a source for a pivot table to build their report.
I've tried a few things:
Making them all a joined source for pivot table, but as they don't have any exclusive fields it failed.
They have a different number of columns and rows, so putting them below each other won't work
I've also tried =Table[Total Value]:Table2[Total Value], but they are joined side by side, and I need them one below each other.
I haven't tried VBA, but it's not out of the question.
I have a couple measures in a Power Pivot data model to analyze activities by a group of consultants:
Total Activities = calculate(DISTINCTCOUNT(ServiceRecords[Activity ID]))
Service Status = if([Distinct Activities]>=5,2,IF([Distinct Activities]=0,0,1)). >> This is to assign a numerical status to customers based on volume of activities
I have a pivot table set up to slice by consultant and show the output of these measure against clients in rows.
I run into trouble when I add a new fact table (Addressable) to the model - this contains Yes/No feedback from sales as to whether a particular account is relevant for a particular consultant. This is linked to the original fact table with two typical index tables classifying consultants and classifying accounts. But the direction of the relationship is inwards from the index tables to this table.
What I'm trying to do is add a second slicer by the Yes/No field in "Addressable" to filter only the records that show Yes or No for the chosen consultant. I thought a CROSSFILTER measure was supposed to do this, but it ends up filtering the data behind calculation of the existing measures instead of just filtering the view. Any idea what I should be doing here?
I'm having trouble unmerging cells on the report.
3 Suppliers for the query
I have a SQL query that shows 3 instances of a supplier (left joined to contact) as shown below. However, when running the report for the query the 3 instance of the supplier is merged into one. This is not desirable in my case because when exporting the report to excel, I'd like to be able to sort columns based on other properties, however, this would not be possible due the the merging of the rows. How can I get results to show individually?
Cells are Merged on the report
Within the properties of each Row Group you can specify which columns to group on. You generally don't need a separate group for each field, but that's OK. In your last group, the one called "(Details)", if it is not grouped by anything, it will show one row per line of results from the query. So take a look at what it's grouped by. As long as the rows are in your dataset, the report will group or show them based on how you configure the grouping here. Grouping on nothing means it will show all rows.
Another tip is to align the end of your header textbox with the line of one of your columns. This will prevent it from creating an extra column in Excel for the "City" field.
Your report does not need all of those groupings - the SSRS grouping is not like SQL. You should only group when you want to aggregate data on that field. Normally you might have a company with its address in various fields in one group but you only need to group once on the Company Name or (preferably) ID - not on each field and not a separate group for each. You could then show details of various invoices in other columns that aren't grouped.
But since you want to display the company data on each row, you would not want ANY grouping on the company.
To fix your issues, remove all the groupings (but not the rows) and just leave the detail group (which doesn't have a Grouping).
You can check out MS Docs: Understanding Groups for a better explanation.
I have a single column table of customer account numbers and a main table containing 400,000 records pulling from an access database. I want to remove all records from the table where the customer account number can be found in the single column table.
The merge query capability in power query allows me to return only the records where there is a match on the customer list (in addition to a variety of other variations on this theme) but I would like to know whether there is a way to invert this so that I return all records where the customer number does not appear in this list.
I have achieved this already by using the List.Contains function and adding a custom column to identify the rows to exclude and then filtering them out, but I think this is severely impacting the performance of my workbook. Refreshing the table that initially has 400,000 rows prior to this series of transformations takes a very long time, and all queries that depend on this table then also take a long time to refresh.
Thank you
If you do a Left Anti Join of your table with a single column, this will give you your table filtered to only have the rows which do not match to the single column.
I have few tables in my data source in Power Pivot:
One is a "Calendar" table from Azure Marketplace (http://datamarket.azure.com/dataset/boyanpenev/datestream) that I'm using for user friendly date representation. Clients table that has basic information about clients (ClientId, Client Name, Recent Address). Each clients may have multiple Accounts (AccountId, Account Name, ClientId). And I have AccountActivity table (AccountId, Date, Income). I've setup relations between tables accordingly.
I need to build a resulting table that is based off AccountActivity and will have Date(Month, Year), Sum of Incomes, # of accounts and # of clients. I was able to get everything except # of clients. Once I'm adding # of clients into the table it starts to complain that there is no reference and instead of showing proper # of clients it is showing total # of clients that does not have any relation to the accounts. Is there any way of making it work or I will have to add into AccountActivity ClientId column?
You shouldn't need to add the ClientID to your source. You can just make a calculated column in your PowerPivot model. I recreated what I think you have
I made 3 tables with fake data that includes 4 clients, 6 accounts:
I added them to my data model and then added the DateStream to my model and created relationships.
Then I:
Went to the activity table in my model and added a calculated column [ClientID] with formula =related(Client[Client ID]).
Created a calculated measure [# Clients]:=DISTINCTCOUNT(Activity[ClientID])
Created a calculated measure [# accounts]:=DISTINCTCOUNT([AccountID])
Created a calculated measure [Sum of Income]:=SUM([Income])
Then I created a pivot table. These calculated measures seem to work across all of your dimensions.