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

Updating computed columns

I sql database and it has a table which has got five columns and two of which computed columns, the table acts as a datasource for the datagridview control. The problem I am having is that when I add a new row in the datagridview by inserting the…
Ahmed
  • 636
  • 1
  • 14
  • 31
0
votes
1 answer

SQL - Generate column from sum of columns from different table

I have two tables: The first one contains numeral values, it looks like this: The id column is the primary key; it has the attribute AUTO_INCREMENT. All columns have the datatype INT. Now my question: Can I create a table like the following:…
STh
  • 746
  • 9
  • 24
0
votes
1 answer

Get total (count) per month in Power BI

I have an 'issue' data set in CSV format that looks like…
Sach
  • 10,091
  • 8
  • 47
  • 84
0
votes
1 answer

Spotfire difference between two row sets

I want to find difference between two sets of data, where I aggregate the value for row set one and row set two and find the difference between the two.. I am looking for something like this -
Rupa SS
  • 19
  • 3
0
votes
1 answer

Excel formula to SQL

I would like to add a column with computed values to my MSSQL database, but I don't know how to create the SQL code My data contains the columns PricePerUnit and Instance_Type I would like the new computed value column to show what percentage…
0
votes
1 answer

Using Power BI to create specifc columns (both headers and data within the header), based on specific conditions in other columns

I first started this with VBA, and I have been advised to use PowerBI. However, I do not really no if my issue can be solved through powerBI. I have a file which will be send on a recurring basis, with specific information which need to be grouped.…
Tomas Michel
  • 146
  • 1
  • 3
  • 17
0
votes
2 answers

Update Column using calculation in last year from another table

I am trying to update (using Inner joins for three tables) item stats STAT for table IM_ITEM by highlighting items that sold less than 12 as "D" (Discontinue). The 2nd table PS_TKT_HIST_LIN has the Quantity sold column QTY_SOLD for each item on…
0
votes
2 answers

SharePoint Formula: [Created]+60 days = Extension Date (but need it to be a weekday)

I need help with a formula that will add [Extension], a choice field of 30, 45, or 60, to [Created], and return a date [Extension Weekday]. BUT, that future date must be a weekday. Example: [Created] + [Extension] = [Extension Weekday], but if the…
ChasEpes
  • 15
  • 6
0
votes
1 answer

Use of computed column from count(*) over(...) statement in a SELECT

I have this select statement in SQL Server Management Studio 2014: SELECT main.car_descr ,vari.engineCode ,count(*) over(partition by vari.engineCode) as quant FROM dbspareparts.dbo.stock as stock inner join…
joe
  • 35
  • 7
0
votes
0 answers

Is it Possible to Update an Excel Cell from a Form Instantly Instead of Requiring the Pressing of an Update Button?

We have a preregistration Excel spreadsheet database for a retirement community's continuing education program. The database has 37 data columns of which 3 are calculated, one is a date format one and all the rest receive either a zero or a one as…
socrtwo
  • 122
  • 1
  • 12
0
votes
2 answers

Calculated columns as axis & value

I have a bunch of calculated DAX columns that I want to show as a visual. If I use a normal bar chart I get the following image, Barchart 1, where because I do not have any fields in the axis field. The titles of each of the calculated columns are…
slauer12
  • 45
  • 1
  • 1
  • 7
0
votes
1 answer

Adding column with minimum date oracle sql

I have this table: As you can see in the image, there are multiple dates for each record. I want to create an extra column with the minimum date for each record. I know how to do it in python but not how to do it in sql. How can I do that?
havaey
  • 9
  • 1
  • 5
0
votes
1 answer

Creating a Pandas column based on values of another column using function

I would like to identify doctors based on their title in a dataframe and create a new column to indicate if they are a doctor but I am struggling with my code. doctorcriteria = ['Dr', 'dr'] def doctor(x): if doctorcriteria in x: return…
Sanch
  • 367
  • 2
  • 11
0
votes
1 answer

Calculate with creating column names in data table on the fly

I have problems in getting data table to create 28 new columns by calculating their value from other column names that are variables and, at the same time, fulfill some conditions. What I am trying to achieve is to distinguish four cases: Fields…
litotes
  • 89
  • 1
  • 12
0
votes
1 answer

PowerBI - Declining Trend Over Time

I'm working on a PowerBI Dashboard where I have a set number of values (Training Session -3084 Sessions) an assigned date of 2/15/20 and a due date of 3/28/20. I'm trying to show a trend over time of the declining incompletions as we approach our…
MM18
  • 7
  • 3