Hi,
I have a table as shown below
ColumnA
2
3
5
6
1
I would like to write a query to get the new columnB as shown below
ColumnB
2/(2+3+5+6+1)
3/17
5/17
6/17
1/17
Can any one you please let me know on how to do this using a query. Thanks.
Hi,
I have a table as shown below
ColumnA
2
3
5
6
1
I would like to write a query to get the new columnB as shown below
ColumnB
2/(2+3+5+6+1)
3/17
5/17
6/17
1/17
Can any one you please let me know on how to do this using a query. Thanks.
Probably using a DSum() function but it would be painfully slow. Is this just an exercise or is there a real world application. A report can do it with little difficulty.
It is a real world application. I just have to display values like
[ColumnA] [ColumnB=valueofEachRow/SumofallvaluesinRow in ColumnA] [ColumnC = logarithmicValueofEachRow in ColumnB i.e log(ColumnB)]. I think if i can get ColumnB, i can easily get ColumnC. You are suggesting about DSum can we do this in a query?. Please let me know. Thanks.
This is an exercise for a spread sheet rather than a Database.
Maybe something like:
SELECT [Table1].[FieldA], [Table1].[FieldA] / Dsum("FieldA","Table1") As [PercentOfTotal] FROM [Table1];
This is what i'm looking for. I made some unsuccessful attempts with sum, but Dsum comes to the rescue. Thanks a lot.
Glad to help.