Questions tagged [calculated-columns]

A calculated column is calculated from an expression that can use other columns in the same table

A calculated column is calculated from an expression that can use other columns in the same table. The expression can be a noncomputed column name, constant, function, and any combination of these connected by one or more operators. The expression cannot be a subquery.

2235 questions
0
votes
1 answer

How to make new columns across multiple lists in R?

I am new to R and I don't quite know what structures to use and the correct syntax for them. I have lists (that are more like tables with columns and column names). I would like to do the same functions to multiple lists. I assumed for loops would…
0
votes
2 answers

How to use Measures in Calculated column Formula in PBI

I'm trying to use a previous calculated Measure in a Calculated Column in PBI, but i get the error "expressions that yield variant data-type cannot be used to define calculated columns", how can i fix this? this is my code Critical_Detrended =…
Carlos Tellez
  • 147
  • 1
  • 2
  • 10
0
votes
2 answers

Remember the previous value of formulas

After a deep research on the internet I managed to find a VBA code that allows me to remember the previous result of a formula. I would like to modify this code to obtain the previous value of the formulas in one column in another column next to…
iPerry
  • 13
  • 3
0
votes
0 answers

remember the previous value of a formula located in one column in another column

The range "C2": "C82" contains functions of type (='Sheet4'!G38) , (='Sheet6'!G36), (='Sheet5'!G18), etc, that is to say, the cells of this Column C obtain values ​​of calculations that are established in other cells of other sheets. My workbook is…
iPerry
  • 13
  • 3
0
votes
1 answer

custom column and calculated column

i am trying to create a custom column using Mon-Year_period = FORMAT(trial[Date],"MMM-YYYY"). It gets accepted when write for custom column but when I close and apply the same, says FORMAT function error. Also, when tried the same for calculated…
0
votes
1 answer

Spotfire: count number of occurrences based on other columns data

I'm struggling with calculating new columns as I'm still new to Spotfire. I am given two Date columns (format: mm/dd/yyyy), one is "Created" and the other is "Closed" as shown below in the left two columns. The end goal is to have two new columns…
jmeddy
  • 109
  • 1
  • 5
  • 16
0
votes
2 answers

How to create table with computed column and if statement?

As in title, I'm trying to create a table on SQL Server that includes computed column with if statement. I have already created basic columns, co currently trying to add computed column using ALTER TABLE. In statement: ALTER table zgodnosc add…
0
votes
1 answer

Can you use an 'In' operator in a column expression?

Using Oracle 11. Trying to write some simple code for a conceptual demo. To illustrate what I'm trying to achieve, imagine I have SOMETABLE that has two columns: ID and NAME, like so: ID NAME --------- 1 Tom 2 Larry 3 David 4 Steve I'm…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
0
votes
0 answers

Value Error when attempting to create new column in Python

I am attempting to create a new column in my dataframe that shows the distance between a set latitude and longitude against the latitude and longitude for each row in my dataframe using the line of code below: df["dist_diff"] =…
0
votes
1 answer

PowerBI - getting daily values from cumulative values

I'm working with a Covid-19 dataset (this one) but it seems harder work because the daily totals are cumulative totals rather than 'new cases' each day. I've been trying to get an accurate figure for daily new cases based on the running total for…
0
votes
3 answers

New pandas columns based on different other columns, depending on a value of another column

Sorry for the title which is maybe more complicated than the problem itself ;) I have de following pandas dataframe grh anc anc1 anc2 anc3 anc4 anc5 anc6 anc7 1 2 5 0.10000 0.12000 0.1800 0.14000 0.15000 …
Bebio
  • 409
  • 5
  • 12
0
votes
1 answer

Generated column without taking up space

I have in post a column I need to generate, which follows a naming pattern. The pattern is unique for each table, but will always include some sort of suffix or prefix, and the current row value of the some of it columns. -- Create…
kafka
  • 573
  • 1
  • 11
  • 28
0
votes
1 answer

Calculate "Down factor" for each row using DAX in Power BI

I have the following format of data: Machine | Production | Production Factor | Down Factor | Order --------|------------|-------------------|-------------|------ M1 | 0 | 0 | 0 | 100 M2 | 187370 | 0 …
Paul Zverev
  • 13
  • 1
  • 3
0
votes
0 answers

create a new Column with value derived from original column

The question is how to add a new column with derived value. I have the following table named Character Name PointsTotal Kat 310 Mat 410 Sam 550 Ram 660 I want the result to display the new column name Level which is…
0
votes
1 answer

How to create an ID that increases by 1 every time the previous row of another column is 1

Working with Python, I need to create two new variables. One (See JourneyID in example) that cummulatively increases by one each time the previous row of another column takes the value '1', and One (See JourneyN in example) that cummulatively…