Grouping Pivot Table Values/Metrics/Calculated Fields into one Field to put in report filter - vba

Say I wanted to group all my metrics that I have in my values in my pivot table(including all added calculated fields) into one field to be able to use in the Report Filter.
So I want all those values in a drop down to be able to select a metric and it populates my pivot table below.
Is that possible with VBA Code? Am I explaining clearly?

Related

SSRS Show all subtotals for each currency at bottom of report

I'd like to show the subtotals for each group at the bottom of my report, rather than inside each group. How can I do this?
Create another dataset that subtotals by currency and add a table at the end the displays the results.
You could add a second grouping to the table and group by your group. Right-click on the group --> Add Group --> Adjacent Below.
Then you'll have an extra grouping in the same table.
Or create a separate table using the same dataset but grouping by each group.

How do I pivot my table the way i want to?

I wrangled my data through python but I am now asked to do the same in SQL. I'm trying to pivot the data in the picture below so the values in 'naam_installation' are the columns, the column 'value' will be the different values and the 'Woning', 'Klant', 'Soort_woning' and 'tijd' will be separate columns. I want it to be like the second screenshot (datetime = tijd).
SQL table to be changed
How I want to data done in python.

Appending a value onto a pivot table from a different sized pivot table

I have two excel pivot tables, one is a table of constant characteristics. For example
Name char1 char2 char3
The second is a table of an ongoing series of measured dimensions of Name
Name Date meas 1 meas 2 etc.
I want to add char1 on to the end of the second pivot table based on the common value Name for ease in graphing values from the second table. I don't think that vlookup will work and haven't been able to figure it out. Any help would be appreciated, thanks
You can connect directly your Access Query to Excel using Power Query or Power Pivot there you can manage the data model and create a relation between both tables using [Name] as key for the join. then when you insert a pivot table using as source the data model in the workbook it will show you all the related tables in the Field List and you can just select the fields that you want for you report. This is an example I wrote for another post but I think this can give you an idea.

One row per column with column name

background
I am trying to create an SSRS report which will run select * on a table passed in as a parameter and display all the data from that table. As I understand it, I can't use a table for this. I want to use a pivot table to achieve this.
select * from #table will return something like this (from the adventureworks DB)
I want to display the date in this format:
Question
How do I achieve this? I looked at using PIVOT/UNPIVOT, but all the examples I've seen use static column names and aggregates.
I won't know the column names at design time (or run time), I'm assuming I will need column headers like 'table name', 'value1', 'value2' etc?
Limitations
I won't have access to create stored procedures. Ideally, the report should be able to be run entirely from SSRS without having to create new tables etc.
Performance is not a concern.
Edit
Editing to add some clarity. The column names in the example above are only an example. The #table parameter could be any table, column names won't be know at design time. The column names could be col1, col2, or name, address... etc.
You can do this with a normal tablix, with a column group on BusinessEntityID
Create a normal tablix.
Remove the row group (group only)
Insert a new parent column group, grouped by BusinessEntityID
Delete the top row (row only)
Add each of the row titles in, as per your suggested output
Add each of the values in the second column

Get row values as column names in t-sql

I have a requirement to display row values as column names in a data grid view. I want to get the store names into columns using sql select statement. (Please refer the attached image). I want user to enter some values under each column. So STORE 1, STORE 2, STORE 3 should displays as columns in datagrid view. Does anyone can help me to get this work?
while googling i found this can be done using PIVOT in SQL. But in this table i don't have any aggregate columns. Any help pls?
the result should be somthing like
You may know that your data only contains a single row for each pivoting column, but SQL Server has to construct a plan that could accommodate multiple rows.
So, use PIVOT and just use an aggregate that, if passed a single value, will return that same value. MIN() and MAX() fit that description (as does SUM if you're working with numeric data)
You may use specific function of dynamic pivot and pass your query with item count column.
You can use below link which provided you function and can easily show you expected output.
http://forums.asp.net/t/1772644.aspx/1
Procedure name:
[dbo].[dynamic_pivot]