I am using OpenOffice Calc. I'm taking a data value from another sheet that is formatted like :
value1,value2
In a cell. I need to split that into 2 cells
value1 value2
I can do it with Data->Text to Columns, but I need it to be done automatically when importing it from the other sheet.
A formula to get value1:
=LEFT(A1;FIND(",";A1)-1)
And value2:
=RIGHT(A1;LEN(A1)-FIND(",";A1))
This assumes that there are no other commas.
Related
I have a table like shown below titled Employees:
Name LOC1 LOC2 LOC3 LOC4
-----------------------------------------
Joe DAY CVG DTW
Jane PVD STL
John LAX SAN SFO ANC
I created a measure to combine the LOC fields into 1 result separated by a space. I keep getting errors because PBi wants to aggregate the data fields. All fields are type Text. I've tried all the usual combine methods, below are a couple of examples...
CombineLOCs=CONCATENATE('Employees'[LOC1],'Employees'[LOC2])
CombineLOCs= 'Employees'[LOC1] & " " & 'Employees"[LOC2]
This is what I get back:
"A single value for column 'LOC1' in table 'Employees' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation....etc."
I ultimately have a table visual on my canvas and instead of listing out all of the columns on that table, I just want 1 column with all of the combined LOC values for each employee in it.
If you just want a single column where the LOC columns are joined together, then you need to create a new column within the table, rather than a new measure. A measure expects you to aggregate the values. A column will concatenate the text strings on a row by row basis.
If you select the new column option, either on the table tools or the fields sidebar, then use the concatenate formula in your question, that should work.
With the new column, you can then include the employee name and the associated LOC values.
I have a large list of client data that I am interested in measuring the number of blanks and the number of cells with data (similar to using the counta and countblank functions in Excel). I'd like the data to be displayed in a table similar to the one pasted below.
Desired Output
[
Sample Data (first 4 rows)
You can use the COUNTBLANKS DAX function.
Your DAX will be something like
Measure Name = COUNTBLANKS(tablename[columnname])
For counts of items that are not blank, then you need to COUNTA function, this will count all non empty cells
Measure Name = COUNTA(tablename[columnname])
In my Google spreadsheet document, I have a table of bills with a column J for dates and a column P for amounts. I would like to build another table that sums these bills by year (one row = one year). The P column has contents like "3245,20 EUR".
Here is the formula I tried (in this example, S5 should be the sum and R5 a numeric value of a specific year) :
S5=SUMIF(YEAR($J$5:$J), R5, VALUE(REGEXEXTRACT($P$5:$P, "^([0-9]+,[0-9]{2}) EUR$")))
This doesn't work. Any solution ? Thank you.
You can use the following formula
=SUM(QUERY({A2:A,ArrayFormula(VALUE(REGEXEXTRACT(SUBSTITUTE(B2:B,",","."), "^([0-9]+\.[0-9]{2}) EUR$")))},
"select Col2 where year(Col1)="&A1&""))
The reason we have to use SUBSTITUTE is because it looks like the price values come from a different locale.
(Please adjust ranges to your needs)
Functions used:
QUERY
ArrayFormula
VALUE
REGEXEXTRACT
SUBSTITUTE
SUM
I have two sheets, both have rows of data where one row represents a specific date in chronological order.
The sumproduct only needs to be made on the latest date (date in below example is in column A).
I set this up with:
=sum(ARRAYFORMULA((A3:A1000=max(A3:A1000))
So assuming that I need to sumproduct the two sheets on this specific row, I can't seem to figure out how to append the sumproduct formula into the arrayformula base.
The sumproduct is pretty basic. Assuming that row 12 is the latest date, I need Sheet 1 Cell B12 to multiply by Sheet 2 Cell B12, then sheet 1 cell C12 to multiply by Sheet 2 Cell C12 and so on.
sumproduct of whole last row of sheet1 with the same row from sheet2:
=ARRAYFORMULA(SUMPRODUCT(
INDIRECT("Sheet1!"&ADDRESS(MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A))), 2)&
":"&MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A)))),
INDIRECT("Sheet2!"&ADDRESS(MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A))), 2)&
":"&MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A))))))
https://i.stack.imgur.com/BTjZv.jpg
I am trying to generate a calculated column B from column A. Notice that column B is basically the same rows as column A except it's offset by 2 rows. I'm trying to generate this with DAX but I don't even know where to begin. I would appreciate any help.
You can use in PowerBI the PowerQuery Editor to append a Column with 2 "null" values (as numeric type) like the example below:
append column in powerbi example
To get this result:
final result of "column B"
Think is a easy way to get what you want.