Calculated Fields on analysis vs dataset

can you help me understand how an analysis interacts with a dataset? Would you recommend creating calculated fields on the analysis or dataset?

I created a bunch of calculated fields in the analysis, however, when I replace the dataset (original is excel workbook and revised is CSV), all of the calculated fields did now show up on the analysis.

Are your fields the same on both files? Did you select “update file” when changing from the excel file to the csv?
Screenshot from 2023-11-03 13-42-49

Hi @akrason
regarding calculated fields on the analysis or dataset it is/should be a common best practice to create (calculated) fields as soon as possible in the pipeline.
Every calculated field that is on row level, independent of filter or user interaction and should available on each analyse (using the same dataset) i would recommend to put in the dataset or even if possible in the datasource.