I am making an SSRS report in following format:
DIVISION
SECTOR
DEPARTMENT
Division contain Sector and Sector contain Department so resulting report becomes something like following. A figure is being shown against each Department and I want to show SUBTOTAL of each Sector right against Sector column (by adding all Department coming under it) and then show TOTAL of Division (by adding all Department or all Sector) at the end. How do I show these totals?
Division1
Sector1 SUBTOTAL HERE (for e.g. 19,000)
Department1 10,000
Department2 9,000
Sector2 SUBTOTAL HERE (for e.g. 8,000)
Department3 8,000
Sector3 SUBTOTAL HERE (for e.g. 13,000)
Department4 10,000
Department5 1,000
Department6 2,000
TOTAL HERE (for e.g. 40,000)
Division2
Sector4 SUBTOTAL HERE (for e.g. 3,500)
Department7 3,500
TOTAL HERE (for e.g. 3,500)
My report is displaying all divisions, sectors and departments with figures like above (I am using groups ) but how do I display SUBTOTAL and TOTAL?
for this report I will assume you have three groups in your Row Groups Pane (Row groups will be there either you use a Matrix or Tablix).
DIVISION (DIVISION Group)
SECTOR (SECTION Group)
DEPARTMENT (Details Group)
Adding totals and sub totals are probably the simplest task in SSRS. See below goto your Row groups pane and add Totals to all the groups you want to, Which will appear as Totals and Sub Totals in your report.
Related
I have blended 2 datasets, joining them by a couple of keys. The left dataset contains data for most of the dates, while the second one has monthly sales goals for each salesman.
So, I'll have the daily sales, which when summed up, they give me the total, but when I sum the sales goals from the right dataset, it gets repeated for each sales person occurrence in the left one, giving me the wrong result.
If I put it on a table visual and set its calculation to Average, it gives me the correct sales goal for each person, but the total is wrong and if I put it on a KPI visual, the total is also wrong.
Any help is appreciated.
Thank you!
Sorry, it is not possible to have the same field aggregated as average first and in the next step sum over these average values.
For the total of the "sales goal" can be extracted from right dataset.
If your data comes from Big Query, you could do following steps:
add an "empty" record for each month and sales person to the left dataset
join the two datasets in BigQuery
add a calculated column "goal per order", which is the "monthly sales goals" divided by the number of orders this salesmen had this month. This count number is count(orders) over (partition by salesmen, month_column)
In Data Studio the aggegated sum of the "goal per order" is the value for "goal per salesman"
I have imported data from a trading exchange listing sellers of a particular cryptocurrency.
From this data, I want to create dynamic pricing to display an average cost on an order based on given order size.
I will give an example of what I am looking for:
Example dataset
Within this example, we would be purchasing the cryptocurrency 'SINS'. As per the data showed on this table, if 29.06 SINS was purchased, that would fill the first order, and the total BTC paid would be 0.00459 BTC.
If an order was placed for 145 SINS, it would fill the orders up to row 12 and partially fill the order in row 13. By calculating that manually, I know that would cost 0.02293365 BTC (calculated using col D) at an average price of 0.00015816 per SIN.
What I would like to achieve is if a number is entered in a cell, it confirms the average price of an order based on the number entered and the orders imported from the trading exchange.
=INDIRECT(ADDRESS(MATCH(VLOOKUP(O2,F2:F,1),F:F,0),7,4))+(
INDIRECT(ADDRESS(MATCH(VLOOKUP(O2,F2:F,1),F:F,0)+1,4,4))*(O2-
INDIRECT(ADDRESS(MATCH(VLOOKUP(O2,F2:F,1),F:F,0),6,4)))/
INDIRECT(ADDRESS(MATCH(VLOOKUP(O2,F2:F,1),F:F,0)+1,3,4)))
spreadsheet demo
I have a pivot table in Excel.
My dataset includes workforce numbers for the 32 states in the country, which are grouped in six different regions. This data set is divided into quarters since 2015 to date.
I need this table to show both the % of total workforce at a national level, and at a regional level.
I have tried using calculate, sum, allselected, but then if I use an slicer and show just one region, I end up with the % of workforce within that region and not at a national level.
I am a beginner in DAX and using Power Pivot, how can I calculate the total workforce at a national level for a given period so that it doesn't change if I change the region?
Please help!
Let's say you have a measure called "Total Workforce" (whatever it is - you haven't provided any information about its meaning).
To calculate total workforce at a national level, you need to create another measure:
National Workforce = CALCULATE( [Total Workforce], ALL(Table[Region]))
where Table is your table name, and Region is the name of the field containing regions. Function ALL in DAX removes all filters from a column, a list of columns, or an entire table.
Then, to calculate the ratio:
Workforce % of National = DIVIDE( [Total Workforce], [National Workforce])
Please note: it's very hard to answer questions like that without seeing your data, data model, formulas and the description of the desired outcome. It'd be great if you could provide this information.
I am trying to create a database that will essentially act as a matchmaking service. I have two tables with the same categories, Clients and Opportunities.
The idea is to enter buy-side Clients as we acquire them, filling out the applicable descriptive fields (EBITDA, Gross Revenue, etc).
Then, when a possible Opportunity comes along, I enter that info in its respective table (with EBITDA, Gross Revenue, etc).
The idea is then to run a query that will essentially "match" records from Clients with records from Opportunities, in a prioritized order, i.e. the items with most matching fields rank at the top.
So I've created the tables (Clients and Opportunities), a third table Values that contains the possible choices for several of the fields, and forms for entering the information into Opportunities and Clients.
I've entered a test record in both Opportunities and Clients tables with several matching fields. But my query isn't returning any hits. Per some advice I received, I tried to add in some SQL code to address a possible NULL issue, but Access won't accept the code. Can this query be written? Are the results I'm looking for possible?
My query, designed using the Wizard, looks like this and returns no hits, despite the sample records in each table having matching entries:
SELECT Clients.*, Opportunities.*
FROM Clients INNER JOIN Opportunities
ON (Clients.[NAICS Sector Codes]=Opportunities.[NAICS Sector Codes])
AND (Clients.[Business Model]=Opportunities.[Business Model])
AND (Clients.[Gross Revenue]=Opportunities.[Gross Revenue])
AND (Clients.EBITDA=Opportunities.EBITDA)
AND (Clients.[EBITDA Margin (%)]=Opportunities.[EBITDA Margin (%)])
AND (Clients.[Growth-Timeframe in Years]=Opportunities.[Growth-Timeframe in Years])
AND (Clients.[Growth-Revenue]=Opportunities.[Growth-Revenue])
AND (Clients.[Growth-EBITDA (%)]=Opportunities.[Growth-EBITDA (%)])
AND (Clients.[Geographical Operational Location Preference]=Opportunities.[Geographical Operational Location Preference])
AND (Clients.[Debt Load]=Opportunities.[Debt Load])
AND (Clients.[Primary Area of Sales Concentration (Geographic)]=Opportunities.[Primary Area of Sales Concentration (Geographic)])
AND (Clients.[% of total revenue from ≤ top 3 customers]=Opportunities.[% of total revenue from ≤ top 3 customers])
AND (Clients.[% of total revenue from ≤ top 10 customers]=Opportunities.[% of total revenue from ≤ top 10 customers])
AND (Clients.[% of total revenue from ≤ top 20 customers]=Opportunities.[% of total revenue from ≤ top 20 customers])
AND (Clients.[Current Management Post-Transaction Plan]=Opportunities.[Current Management Post-Transaction Plan])
AND (Clients.[Preferred Deal Structure]=Opportunities.[Preferred Deal Structure]) AND (Clients.NAPCS=Opportunities.NAPCS)
AND (Clients.Notes=Opportunities.Notes)
AND (Clients.[ZLD Sector Notes]=Opportunities.[ZLD Sector Notes]);
I have a Matrix style report that I have created and it is currently displaying a total count of items for a series of companies throughout a 12 month period.
[Company1] [Company2] [Etc....] [Total]
[May] (Count)(Percent)
[June]
[Etc]
[Totals]-----------------------------------------------------
The last column total is a subtotal function and automatically adds column counts based on what is in the Column group which in my case gives me a total for both (Count)(Percent)
I only want to show <Count> but I don't find any method of modifying the parameters for the subtotal function.
The only way I found was to add an additional matrix to the right hand side of the main but only display total counts. Kind of hokey and I will refrain from implementing it at this time.
Any suggestions?