change column letter in formula with drag down - drag-and-drop

This is the formula
=SUM(Sheet2!A2:A10)
What i've been trying to do is as I drag down the column to have the formula change to =SUM(Sheet2!B2:B10) and so on.
Basically is what happens we drag to the right we get an increment on the column letter, but I want it when I drag down

For a limited number of rows, the formula below in Row2 and copied down should work:
=SUM(INDIRECT("Sheet2!"&CHAR(64+ROW())&"2:"&CHAR(64+ROW())&10))
Beyond 26 rows I would suggest switching to using a helper column instead of creating teh character value from the row number.

Related

Showing absolute and percentage values in Tableau

I want to show both absolute and percentage value in a single view in the form of a matrix.
In the below view I am trying to add one more column showing values as percentages of total
Got hint here but not able to replicate:Tableau - Both count and Percentage in Measure Values
The data is like this
can any one please suggest!
Not that difficult. I recreated a data like yours,
Follow these steps
Add slide on rows
Add number of records in text on marks card
Add table calculation on this field -> percent of total. The view will look like this
Notice a small triangle in 'no of records' field. That indicates that it is table calculation
Add number of records field once again to text. (Tip: Double click the field number of records to add it to view directly)
Reorder as you like
or with totals

Ag-Grid: lock a column's position to the last column

I am wondering if there is a way to effectively lock a column in Ag-Grid so that the column is always the very last column no matter what.
Background
What I am ultimately looking for is to avoid the blank space after the last column if the grid size is wider than all column width combined. This is to give the grid a consistent, professional look especially considering even/odd rows are rendered usually in different color. I would prefer the blank space also has that alternating background color.
Given there seems to be no grid property that forces the grid to render the blank space at the end as a pseudo column, I am therefore considering to add a pseudo column manually in such a way that:
the pseudo column has no header
the pseudo column has no data
the pseudo column is not sortable (achieved via sortable: false)
the pseudo column is not manually resizable (achieved via resizable: false)
the pseudo column is the only column which has suppressSizeToFit: false
lock the pseudo column to always be the last column so that user cannot drag a column to the right side of it
I've found a way to achieve everything apart from the last item in the above list. I know I can suppressMovable: true but that only ensures the column itself is not draggable, it does not prevent user from dragging a column to the right side of it.
Effectively, I am looking for something similar to lockPosition but instead of locking the column to the front I want to lock the column to the end.
Keep an eye on currently open AG-3326 issue in ag-grid backlog https://www.ag-grid.com/ag-grid-pipeline/
"Allow locking ( lockPosition ) a column to always be either the first or last columns (currently only the first column is supported)"
What I am ultimately looking for is to avoid the blank space after the last column if the grid size is wider than all column width combined
You could use sizeColumnsToFit() API for columns to adjust in size to fit the grid horizontally. Using this API, there won't be any blank space after the last column, but make sure you have not specified the width for at least one column. This is the column that will expand/shrink to fit the size of the grid.
Call sizeColumnsToFit() after the gridReady event has fired.
Here is an effective workaround to lock the right-most column until AG-3326 is implemented.
onColumnMoved: params => {
const columnCount = params.columnApi.getAllColumns().filter(c => c.isVisible()).length;
const maxIndex = columnCount - 2;
if(params.toIndex > maxIndex) {
params.columnApi.moveColumnByIndex(params.toIndex, maxIndex);
}
}
Any column that is moved to the right of the 'locked' column is immediately moved to the left of the 'locked' column.

Adding Two Subtotals in SSRS to Another Cell

I've got a report that I want to sum some of the columns and then do some basic subtraction on the summations on a row underneath. In my screenshot, I've got the columns summing correctly, and the row is hidden which is what I'm looking for.
But I'm not sure how or if I can then take the Sum(Prod_Coll) minus Sum(Proc_Perf) and make that value display in the bottom right cell (Drop Total Here).
Is this possible to do within SSRS?
right click on the empty cell, click create placeholder, click the Fx button next to value and enter:
=sum(prod_coll)-Sum(Proc_Perf)
That should do it unless I'm missing something.

Why is cell increment not detected correctly in LibreOffice Calc

I have a column which I'd like to fill by selecting the top two cells and then drag down the column.
The cell contents are:
=Sheet1.B11
=Sheet1.B31
So when I drag down I expect to see
=Sheet1.B51
=Sheet1.B71
Instead, I get
=Sheet1.B13
=Sheet1.B33
Why is Calc not detecting the increment correctly? Adding more cells manually does not help.
The numbers in cell references are not single numbers which can be used to create a series in this way. In other words: The cell reference B11 is not "B"&11, but even one single cell reference.
To get references from Sheet1.B11 upwards in steps of 20, you could use INDEX like this:
=INDEX($Sheet1.$B$1:$B$100000,11+(ROW(A1)-1)*20)
Put this formula into a cell and fill it down.

Create a Crystal Report cross-tab 'header' label

I'd like to create a 'header' label that 1) is centered over the cross-tab and 2) grows with it. Unfortunately, CR 2008 (or earlier for that matter) doesn't have this feature.
In image (below), I've added a text field above the cross-tab, but I can't think of a way to get it to grow/shrink (horizontally) with it.
If you're able to calculate, say by a summary function, the number of columns you will have then you can do this:
In your crosstab, check to see the width of your columns. The columns should be set widths. Edit: The crosstab adds some padding, so you will have to figure out the column width by measuring in Crystal with another field and eyeballing until it's close enough to work
Right-click on your label, and hit "Size & Position".
Add a new formula for the "Width". The X,Y positions should stay the same.
Use the summary function (You could create a SQL Expression or formula that only shows the month/year of your date fields and then distinctCount() them) to find out how many columns you will have multiplied by the width of each column. This will take some trial and error for sure, but I don't see why it wouldn't work.