Using spreadsheet functions, can we create a new row by copying format properties of another row in the same sheet? - coldfusion

Using spreadsheet functions, can we create a new row by copying format properties of another row in the same sheet programtically?
In my excel template, I have some border styles and sum formula at the end of table, can I create a new row in last with that styles copied and summation formula applied?
For example in my template I have some tabular data starting from row 10-15 with some format styles for that rows, can I copy that format and add new row below it?

Related

Is there a formula to automatically drag data form many columns into a new column?

I would like to create a new table in Power Query (for Power BI) with 2 columns that contain data from other columns. These 2 new columns should have the data from the source columns stacked one over eachother. Attached is a link with the desired results.
https://ibb.co/dP1k6pd
What I need is a formula that will automatically update the new columns (ID and cars).
Have not tried anything as I do not have any ideas how to do this yet.
No code provided.
The new columns should automatically drag the data from the source columns and organize it vertically.
Best regards,
Denis
Go to the Edit Queries then select all 3 columns at the header (with shift and mouse click) then go to Transform > Unpivot Columns > Unpivot Only Selected Columns.
You can remove the middle column now and change the column headers to get your desired result.

Dynamic measure for nonblank rows Power BI

I'm trying to create a bar chart with the count of nonblank rows as values and the column headers on the axis.
I've created some 'hard-coded' measures that look at each of the columns, e.g.:
COUNTBLANK(Planning[Actual_ClosingMeeting])
but when charting they are clustered together under a single axis value.
I was thinking if I could create a measure that looked at nonblank rows I could chart that and the axis would work as a filter? Perhaps this approach isn't the solution though.
Thanks
Here's one possible way to do this (there are probably better ones if you've got many columns you want to chart rather than a handful):
Create a new table (Home > Enter Data) that has a single column containing all the different headers that you want on your column chart. E.g.
MeetingType
-----------
Closing
Draft
End
Once you have that defined, create a new calculated column (Modeling > New Colum) which counts the blanks corresponding to the different columns using a SWITCH function.
Count = SWITCH(MeetingType[MeetingType],
"Closing", COUNTBLANK(Planning[ActualClosingMeeting]),
"Draft", COUNTBLANK(Planning[ActualDraftMeeting]),
"End", COUNTBLANK(Planning[ActualEndMeeting]))
Now you can create a bar chart with MeetingType[MeetingType] on the axis and MeetingType[Count] in the values box.

How to show value in only first cell in case of duplicate Power BI

I wrote a query in Power BI which returns results like this
Is it possible: For the first column Service Name if value is same in cells than to show value in the first cell and than leaves all the other cells blank until the value is changed, If the new value is repeating than again leave all the cells blank until a new value found
All you need to do is to change the table visualization to matrix visualization.
Just keep the column under the Rows section.
The matrix visualization will then group and hide the repeating values automatically.
For me, when I switched to a Matrix visualization, it displayed all fields in a single column with plus signs to view detail. To show each field in a separate column, go to "Column Headers" and turn off "Stepped layout".
Use Matrix visualization
Add Service Name and Ticket Type into the Rows
Drill down the visule
go to setting, and under Row Header, remove Stepped

How to add external data as new columns in Power Query?

Today is my first day to use PowerBI 2.0 Desktop.
Is there any way to add new columns from external data into the existing table in my PowerBI?
Or is there anyway to add new columns from another table in PowerBI?
It seems that, in PowerQuery, all the tabs Add Custom Column, Add Index Column and Duplicate Column are all using the existing columns in the same table.....
You can use Merge Queries to join together two queries, which will let you bring in the other table's columns.
Also, Add Custom Column accepts an arbitrary expression, so you can reference other tables in that expression. For example, if Table1 and Table2 had the same number of rows, I could copy over Table2's column by doing the following:
Add an Index Column. Let's call it Index.
Add a Custom Column with the following expression: Table2[ColumnName]{[Index]}

Can you resize column widths in a google chart table?

So I have a table that shows the index number of the rows. I've maximized the width of the table to be the exact same as the page. Unfortunately the column with the index numbers are now annoying wide so I'm wondering if there's a way I can either set a cap how wide the first column is or make all the columns in the table adjustable? Thanks!
Setting column widths in the Google Visualization API Tables is really annoying. HTML tables set the column widths based on the first row of data in the table, which for the Google Visualization API is the header row (normal table construction would put the header row in <thead> with <th> tags, but Google puts it in <tbody> with <td> tags, which is why it defines the column widths). The API does not provide any method to assign css or classes to the individual cells in the header row, so you have to write javascript to parse your table and set appropriate classes/CSS to handle your column widths. Furthermore, since the table gets deleted from the HTML and redrawn whenever the user clicks column headers to sort the table or clicks the page buttons (if paging is enabled), you have to re-assign classes/CSS to the cells whenever the table is redrawn. To complicate things even more, if you have a height assigned to the table so that the table will scroll when it gets too big, the API actually draws two tables in order to create the fixed header effect.
Normally I'm an advocate of using the Google Visualization API, but in the case of the Table visualization, it is sometimes more trouble than it is worth. You might have an easier time working with another library, or creating your own custom table visualization.
If you want to continue using the Table visualization, here's some code to get you started:
google.visualization.events.addListener(table, 'ready', function () {
var headerCells = document.querySelectorAll('#myTableDiv table tr:first-child td');
for (var i = 0; i < headerCells.length; i++) {
// access the header cell element with headerCells.item(i)
}
});