Access 2010 VBA: What is the VBA object that represents a Pivot Table Form field's returned values? - arrays

I'm attempting to assign the result of an Access Pivot Table's field of queried values to an array variable, but I'm having trouble finding the appropriate representative object in the MSDN library for a Form/Pivot Table/field/ values.

A few thoughts:
pivot tables are not supported in access 2013.
Can you get the same data from a recordset?
H

Related

Excel 2010 Pivot Table Column Headings from SQL bit field

I have a bit field in my SQL Server data table called 'inPub' with 1/0 True/False values.
When I surface the data in an Excel pivot table I get a layout like this
How do nI change those TRUE/FALSE display values into something more meaningful and insightful such as InPub/NotInPub
you could choose to overwrite the value's in the pivottable just by typing over them.
Nicer would be to put a view on you table in SQL server used for reporting (second layour on base data)

Insert properties of DapperRow into database?

I have a DapperRow dynamic object containing fields retrieved from a table. I had gotten the DapperRow from a previous Query.
I'd like to insert these fields, and a few others, into a different table. However, I can't pass the dynamic in the Execute
con.Execute(insertStatment, rowData);
I will drop back to standard SQL and bind the parameters myself -- I'm just wondering if there's some Dapper feature I'm missing.
Thanks

Changing datatype of field in OLAP Cube

I'm working on OLAP Cube on SQL-Server 2008 and I have to add one field to existing OLAP Cube.
I got a problem, because field in source database is of type Integer, and in the cube it have to be Date. It has format MMYYYY.
DataType in properties of this field is grayed out so I cannot edit it. Is there any way to change it's type to Date?
I have never worked with OLAP.
In the Data Source View in your SSAS project, add a computed column that uses SQL to derive a Date column from the value of the int column.
Then in your cube, reference the computed column in your Data Source View instead of the original column.

Defining measure with a varchar field in OLAP Cube

I'm trying to create a multidimentional database from a preexisting database using SQL Server Analysis Services. My problem is that the original database stores all information on a varchar field called "value". What's in that field depends on another field that holds the type of statistic. So I can have for example a fact with statistic_type "number of products sold" with value 1000 and another with type "cost of material bought" with value 5000. The values can have completely differentic meanings, some are numeric values, others are percentages and others are strings.
How do I turn those into measures. Should the statistic_type be a dimension of the cube and have the value as a measure? Does a measure always need to have a numeric value? Should I separate the fact table amoung several tables, one for each type of statistic? Or is there some sensible way to create a cube using just the one table.
It's the first time I'm working with multidimentional databases and SSAS so I'm a little lost.
A measure always needs to have a numeric value. In fact, you will probably have to cast the value column as a numeric datatype in your Data Source View in order for it to even be a candidate for a measure in your cube.
You should make statistic_type a dimension and "value" a measure. It's ok to just use the one table, although it might be easier to work with if you make a lookup table of the distinct statistic_types.

How to group rows (bassed on CustomerID) using Pivot in SSIS?

I am practicing SSIS and currently working on Pivot transformation. Here's what i am working on.
I created a Data Source (Table name: Pivot) with the following data.
Using SSIS, i created a package for Pivoting the data to have the following columns
PersonID --- Product1 --- Product2 --- Product3.
Here's where am at, I was able to create the pivot data to text file. But The output is not grouped by PersonID.
My Current Output is
As we can see the Transformation does not group the based on
SetKey(PersonID : PivotUsage =1)
The output i am hoping to get is
Where the data is grouped based on PersonID.
What am i missing here?
Edit:
Going back to the example i was following, I re-ordered the input data as follows.
Does the Input data need to be in this order/pattern, every time? Most of the examples i came across follow the similar pattern.
Yes, the input data needs to be sorted by whatever you're pivoting on:
To pivot data efficiently, which means creating as few records in the
output dataset as possible, the input data must be sorted on the pivot
column. If the data is not sorted, the Pivot transformation might
generate multiple records for each value in the set key, which is the
column that defines set membership. For example, if the dataset is
pivoted on a Name column but the names are not sorted, the output
dataset could have more than one row for each customer, because a
pivot occurs every time that the value in Name changes.
That's a direct quote from the Pivot Transformation documentation on MSDN. (Emphasis added.)
When I first read this answer, I thought that the sorted column should be the one with PivotUsage=2 in the pivot. That's what I understood the pivot column to be. However, what finally worked for me was to sort by a column with pivot usage=1. It's a column I would group by if writing the sql by hand.

Resources